| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 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 | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // WARNING: Do not edit - generated code. | 5 // WARNING: Do not edit - generated code. |
| 6 | 6 |
| 7 class IDBObjectStoreWrappingImplementation extends DOMWrapperBase implements IDB
ObjectStore { | 7 class IDBObjectStoreWrappingImplementation extends DOMWrapperBase implements IDB
ObjectStore { |
| 8 IDBObjectStoreWrappingImplementation._wrap(ptr) : super._wrap(ptr) {} | 8 IDBObjectStoreWrappingImplementation._wrap(ptr) : super._wrap(ptr) {} |
| 9 | 9 |
| 10 String get keyPath() { return _ptr.keyPath; } | 10 String get keyPath() { return _ptr.keyPath; } |
| 11 | 11 |
| 12 String get name() { return _ptr.name; } | 12 String get name() { return _ptr.name; } |
| 13 | 13 |
| 14 IDBRequest add(String value, [IDBKey key = null]) { | 14 IDBTransaction get transaction() { return LevelDom.wrapIDBTransaction(_ptr.tra
nsaction); } |
| 15 |
| 16 IDBRequest add(String value, [IDBKey key]) { |
| 15 if (key === null) { | 17 if (key === null) { |
| 16 return LevelDom.wrapIDBRequest(_ptr.add(value)); | 18 return LevelDom.wrapIDBRequest(_ptr.add(value)); |
| 17 } else { | 19 } else { |
| 18 return LevelDom.wrapIDBRequest(_ptr.add(value, LevelDom.unwrap(key))); | 20 return LevelDom.wrapIDBRequest(_ptr.add(value, LevelDom.unwrap(key))); |
| 19 } | 21 } |
| 20 } | 22 } |
| 21 | 23 |
| 22 IDBRequest clear() { | 24 IDBRequest clear() { |
| 23 return LevelDom.wrapIDBRequest(_ptr.clear()); | 25 return LevelDom.wrapIDBRequest(_ptr.clear()); |
| 24 } | 26 } |
| (...skipping 12 matching lines...) Expand all Loading... |
| 37 } | 39 } |
| 38 | 40 |
| 39 IDBRequest getObject(IDBKey key) { | 41 IDBRequest getObject(IDBKey key) { |
| 40 return LevelDom.wrapIDBRequest(_ptr.getObject(LevelDom.unwrap(key))); | 42 return LevelDom.wrapIDBRequest(_ptr.getObject(LevelDom.unwrap(key))); |
| 41 } | 43 } |
| 42 | 44 |
| 43 IDBIndex index(String name) { | 45 IDBIndex index(String name) { |
| 44 return LevelDom.wrapIDBIndex(_ptr.index(name)); | 46 return LevelDom.wrapIDBIndex(_ptr.index(name)); |
| 45 } | 47 } |
| 46 | 48 |
| 47 IDBRequest openCursor([IDBKeyRange range = null, int direction = null]) { | 49 IDBRequest openCursor([IDBKeyRange range, int direction]) { |
| 48 if (range === null) { | 50 if (range === null) { |
| 49 if (direction === null) { | 51 if (direction === null) { |
| 50 return LevelDom.wrapIDBRequest(_ptr.openCursor()); | 52 return LevelDom.wrapIDBRequest(_ptr.openCursor()); |
| 51 } | 53 } |
| 52 } else { | 54 } else { |
| 53 if (direction === null) { | 55 if (direction === null) { |
| 54 return LevelDom.wrapIDBRequest(_ptr.openCursor(LevelDom.unwrap(range))); | 56 return LevelDom.wrapIDBRequest(_ptr.openCursor(LevelDom.unwrap(range))); |
| 55 } else { | 57 } else { |
| 56 return LevelDom.wrapIDBRequest(_ptr.openCursor(LevelDom.unwrap(range), d
irection)); | 58 return LevelDom.wrapIDBRequest(_ptr.openCursor(LevelDom.unwrap(range), d
irection)); |
| 57 } | 59 } |
| 58 } | 60 } |
| 59 throw "Incorrect number or type of arguments"; | 61 throw "Incorrect number or type of arguments"; |
| 60 } | 62 } |
| 61 | 63 |
| 62 IDBRequest put(String value, [IDBKey key = null]) { | 64 IDBRequest put(String value, [IDBKey key]) { |
| 63 if (key === null) { | 65 if (key === null) { |
| 64 return LevelDom.wrapIDBRequest(_ptr.put(value)); | 66 return LevelDom.wrapIDBRequest(_ptr.put(value)); |
| 65 } else { | 67 } else { |
| 66 return LevelDom.wrapIDBRequest(_ptr.put(value, LevelDom.unwrap(key))); | 68 return LevelDom.wrapIDBRequest(_ptr.put(value, LevelDom.unwrap(key))); |
| 67 } | 69 } |
| 68 } | 70 } |
| 69 } | 71 } |
| OLD | NEW |