| 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 IDBObjectStoreWrappingImplementation extends DOMWrapperBase implements IDB
ObjectStore { | |
| 8 IDBObjectStoreWrappingImplementation._wrap(ptr) : super._wrap(ptr) {} | |
| 9 | |
| 10 String get keyPath() { return _ptr.keyPath; } | |
| 11 | |
| 12 String get name() { return _ptr.name; } | |
| 13 | |
| 14 IDBTransaction get transaction() { return LevelDom.wrapIDBTransaction(_ptr.tra
nsaction); } | |
| 15 | |
| 16 IDBRequest add(String value, [IDBKey key]) { | |
| 17 if (key === null) { | |
| 18 return LevelDom.wrapIDBRequest(_ptr.add(value)); | |
| 19 } else { | |
| 20 return LevelDom.wrapIDBRequest(_ptr.add(value, LevelDom.unwrap(key))); | |
| 21 } | |
| 22 } | |
| 23 | |
| 24 IDBRequest clear() { | |
| 25 return LevelDom.wrapIDBRequest(_ptr.clear()); | |
| 26 } | |
| 27 | |
| 28 IDBIndex createIndex(String name, String keyPath) { | |
| 29 return LevelDom.wrapIDBIndex(_ptr.createIndex(name, keyPath)); | |
| 30 } | |
| 31 | |
| 32 IDBRequest delete(IDBKey key) { | |
| 33 return LevelDom.wrapIDBRequest(_ptr.delete(LevelDom.unwrap(key))); | |
| 34 } | |
| 35 | |
| 36 void deleteIndex(String name) { | |
| 37 _ptr.deleteIndex(name); | |
| 38 return; | |
| 39 } | |
| 40 | |
| 41 IDBRequest getObject(IDBKey key) { | |
| 42 return LevelDom.wrapIDBRequest(_ptr.getObject(LevelDom.unwrap(key))); | |
| 43 } | |
| 44 | |
| 45 IDBIndex index(String name) { | |
| 46 return LevelDom.wrapIDBIndex(_ptr.index(name)); | |
| 47 } | |
| 48 | |
| 49 IDBRequest openCursor([IDBKeyRange range, int direction]) { | |
| 50 if (range === null) { | |
| 51 if (direction === null) { | |
| 52 return LevelDom.wrapIDBRequest(_ptr.openCursor()); | |
| 53 } | |
| 54 } else { | |
| 55 if (direction === null) { | |
| 56 return LevelDom.wrapIDBRequest(_ptr.openCursor(LevelDom.unwrap(range))); | |
| 57 } else { | |
| 58 return LevelDom.wrapIDBRequest(_ptr.openCursor(LevelDom.unwrap(range), d
irection)); | |
| 59 } | |
| 60 } | |
| 61 throw "Incorrect number or type of arguments"; | |
| 62 } | |
| 63 | |
| 64 IDBRequest put(String value, [IDBKey key]) { | |
| 65 if (key === null) { | |
| 66 return LevelDom.wrapIDBRequest(_ptr.put(value)); | |
| 67 } else { | |
| 68 return LevelDom.wrapIDBRequest(_ptr.put(value, LevelDom.unwrap(key))); | |
| 69 } | |
| 70 } | |
| 71 } | |
| OLD | NEW |