xdriver 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/Table.d.ts CHANGED
@@ -24,7 +24,7 @@ export default class Table {
24
24
  query(keyRange?: KeyRange, limit?: number): any;
25
25
  queryByKey(key: any): any;
26
26
  fetch(keyRange?: KeyRange, direction?: CursorDirection): Promise<unknown>;
27
- queryByIndex(name: string, key: any): any;
27
+ queryByIndex(name: string, key: any, count?: number): any;
28
28
  deplete(direction?: any): Promise<unknown>;
29
29
  multiple(indexName: string, each: Function, keyRange?: KeyRange, cursorDirection?: CursorDirection): Promise<unknown>;
30
30
  }
package/lib/Table.js CHANGED
@@ -111,10 +111,10 @@ export default class Table {
111
111
  });
112
112
  });
113
113
  }
114
- queryByIndex(name, key) {
114
+ queryByIndex(name, key, count) {
115
115
  const store = _getObjectStore(this);
116
116
  const index = store.index(name);
117
- return _request(index.getAll(key));
117
+ return _request(index.getAll(key, count));
118
118
  }
119
119
  deplete(direction = CursorDirection.NEXT) {
120
120
  const store = _getObjectStore(this, TransactionMode.READ_WRITE);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xdriver",
3
- "version": "1.0.03",
3
+ "version": "1.0.04",
4
4
  "description": "A simple driver for IndexDB",
5
5
  "main": "./lib/index",
6
6
  "files": [