OLD | NEW |
| (Empty) |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | |
2 // for details. All rights reserved. Use of this source code is governed by a | |
3 // BSD-style license that can be found in the LICENSE file. | |
4 | |
5 // WARNING: Do not edit - generated code. | |
6 | |
7 class IDBIndexWrappingImplementation extends DOMWrapperBase implements IDBIndex
{ | |
8 IDBIndexWrappingImplementation._wrap(ptr) : super._wrap(ptr) {} | |
9 | |
10 String get keyPath() { return _ptr.keyPath; } | |
11 | |
12 String get name() { return _ptr.name; } | |
13 | |
14 IDBObjectStore get objectStore() { return LevelDom.wrapIDBObjectStore(_ptr.obj
ectStore); } | |
15 | |
16 bool get unique() { return _ptr.unique; } | |
17 | |
18 IDBRequest getObject(IDBKey key) { | |
19 return LevelDom.wrapIDBRequest(_ptr.getObject(LevelDom.unwrap(key))); | |
20 } | |
21 | |
22 IDBRequest getKey(IDBKey key) { | |
23 return LevelDom.wrapIDBRequest(_ptr.getKey(LevelDom.unwrap(key))); | |
24 } | |
25 | |
26 IDBRequest openCursor([IDBKeyRange range, int direction]) { | |
27 if (range === null) { | |
28 if (direction === null) { | |
29 return LevelDom.wrapIDBRequest(_ptr.openCursor()); | |
30 } | |
31 } else { | |
32 if (direction === null) { | |
33 return LevelDom.wrapIDBRequest(_ptr.openCursor(LevelDom.unwrap(range))); | |
34 } else { | |
35 return LevelDom.wrapIDBRequest(_ptr.openCursor(LevelDom.unwrap(range), d
irection)); | |
36 } | |
37 } | |
38 throw "Incorrect number or type of arguments"; | |
39 } | |
40 | |
41 IDBRequest openKeyCursor([IDBKeyRange range, int direction]) { | |
42 if (range === null) { | |
43 if (direction === null) { | |
44 return LevelDom.wrapIDBRequest(_ptr.openKeyCursor()); | |
45 } | |
46 } else { | |
47 if (direction === null) { | |
48 return LevelDom.wrapIDBRequest(_ptr.openKeyCursor(LevelDom.unwrap(range)
)); | |
49 } else { | |
50 return LevelDom.wrapIDBRequest(_ptr.openKeyCursor(LevelDom.unwrap(range)
, direction)); | |
51 } | |
52 } | |
53 throw "Incorrect number or type of arguments"; | |
54 } | |
55 } | |
OLD | NEW |