start on pseudocursor
diff --git a/packages/node_modules/pouchdb-adapter-idb/src/pseudoCursor.js b/packages/node_modules/pouchdb-adapter-idb/src/pseudoCursor.js new file mode 100644 index 0000000..a73f947 --- /dev/null +++ b/packages/node_modules/pouchdb-adapter-idb/src/pseudoCursor.js
@@ -0,0 +1,34 @@ +// Abstraction over IDBCursor and getAll()/getAllKeys() that allows us to batch our operations +// while falling back to a normal IDBCursor operation on browsers that don't support getAll() or +// getAllKeys(). This allows for a much faster implementation than just straight-up cursors. +function pseudoCursor(txn, objectStore, keyRange, descending, batchSize, onBatch) { + + var useGetAll = typeof objectStore.getAll === 'function' && + typeof objectStore.getAllKeys === 'function' && batchSize > 1 && !descending; + + var cursorReq; + var getAllReq; + var getAllKeysReq; + + if (useGetAll) { + } else { + + } + + + + txn.onabort = idbError(opts.complete); + txn.oncomplete = onTxnComplete; + + + function continueFunc() { + + } + + return { + "continue": continueFunc; + } + +} + +export default pseudoCursor; \ No newline at end of file