OLD | NEW |
| (Empty) |
1 | |
2 class _IDBIndexImpl extends _DOMTypeBase implements IDBIndex { | |
3 _IDBIndexImpl._wrap(ptr) : super._wrap(ptr); | |
4 | |
5 String get keyPath() => _wrap(_ptr.keyPath); | |
6 | |
7 bool get multiEntry() => _wrap(_ptr.multiEntry); | |
8 | |
9 String get name() => _wrap(_ptr.name); | |
10 | |
11 IDBObjectStore get objectStore() => _wrap(_ptr.objectStore); | |
12 | |
13 bool get unique() => _wrap(_ptr.unique); | |
14 | |
15 IDBRequest count([var key_OR_range = null]) { | |
16 if (key_OR_range === null) { | |
17 return _wrap(_ptr.count()); | |
18 } else { | |
19 if (key_OR_range is IDBKeyRange) { | |
20 return _wrap(_ptr.count(_unwrap(key_OR_range))); | |
21 } else { | |
22 if (key_OR_range is IDBKey) { | |
23 return _wrap(_ptr.count(_unwrap(key_OR_range))); | |
24 } | |
25 } | |
26 } | |
27 throw "Incorrect number or type of arguments"; | |
28 } | |
29 | |
30 IDBRequest getObject(IDBKey key) { | |
31 return _wrap(_ptr.getObject(_unwrap(key))); | |
32 } | |
33 | |
34 IDBRequest getKey(IDBKey key) { | |
35 return _wrap(_ptr.getKey(_unwrap(key))); | |
36 } | |
37 | |
38 IDBRequest openCursor([IDBKeyRange range = null, int direction = null]) { | |
39 if (range === null) { | |
40 if (direction === null) { | |
41 return _wrap(_ptr.openCursor()); | |
42 } | |
43 } else { | |
44 if (direction === null) { | |
45 return _wrap(_ptr.openCursor(_unwrap(range))); | |
46 } else { | |
47 return _wrap(_ptr.openCursor(_unwrap(range), _unwrap(direction))); | |
48 } | |
49 } | |
50 throw "Incorrect number or type of arguments"; | |
51 } | |
52 | |
53 IDBRequest openKeyCursor([IDBKeyRange range = null, int direction = null]) { | |
54 if (range === null) { | |
55 if (direction === null) { | |
56 return _wrap(_ptr.openKeyCursor()); | |
57 } | |
58 } else { | |
59 if (direction === null) { | |
60 return _wrap(_ptr.openKeyCursor(_unwrap(range))); | |
61 } else { | |
62 return _wrap(_ptr.openKeyCursor(_unwrap(range), _unwrap(direction))); | |
63 } | |
64 } | |
65 throw "Incorrect number or type of arguments"; | |
66 } | |
67 } | |
OLD | NEW |