OLD | NEW |
1 /** | 1 /** |
2 * A client-side key-value store with support for indexes. | 2 * A client-side key-value store with support for indexes. |
3 * | 3 * |
4 * Many browsers support IndexedDB—a web standard for | 4 * Many browsers support IndexedDB—a web standard for |
5 * an indexed database. | 5 * an indexed database. |
6 * By storing data on the client in an IndexedDB, | 6 * By storing data on the client in an IndexedDB, |
7 * a web app gets some advantages, such as faster performance and persistence. | 7 * a web app gets some advantages, such as faster performance and persistence. |
8 * To find out which browsers support IndexedDB, | 8 * To find out which browsers support IndexedDB, |
9 * refer to [Can I Use?](http://caniuse.com/#feat=indexeddb) | 9 * refer to [Can I Use?](http://caniuse.com/#feat=indexeddb) |
10 * | 10 * |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 'IDBIndex': () => Index, | 115 'IDBIndex': () => Index, |
116 'IDBKeyRange': () => KeyRange, | 116 'IDBKeyRange': () => KeyRange, |
117 'IDBObjectStore': () => ObjectStore, | 117 'IDBObjectStore': () => ObjectStore, |
118 'IDBOpenDBRequest': () => OpenDBRequest, | 118 'IDBOpenDBRequest': () => OpenDBRequest, |
119 'IDBRequest': () => Request, | 119 'IDBRequest': () => Request, |
120 'IDBTransaction': () => Transaction, | 120 'IDBTransaction': () => Transaction, |
121 'IDBVersionChangeEvent': () => VersionChangeEvent, | 121 'IDBVersionChangeEvent': () => VersionChangeEvent, |
122 | 122 |
123 }; | 123 }; |
124 | 124 |
| 125 // FIXME: Can we make this private? |
| 126 final indexed_dbBlinkFunctionMap = { |
| 127 'IDBCursor': () => Cursor.internalCreateCursor, |
| 128 'IDBCursorWithValue': () => CursorWithValue.internalCreateCursorWithValue, |
| 129 'IDBDatabase': () => Database.internalCreateDatabase, |
| 130 'IDBFactory': () => IdbFactory.internalCreateIdbFactory, |
| 131 'IDBIndex': () => Index.internalCreateIndex, |
| 132 'IDBKeyRange': () => KeyRange.internalCreateKeyRange, |
| 133 'IDBObjectStore': () => ObjectStore.internalCreateObjectStore, |
| 134 'IDBOpenDBRequest': () => OpenDBRequest.internalCreateOpenDBRequest, |
| 135 'IDBRequest': () => Request.internalCreateRequest, |
| 136 'IDBTransaction': () => Transaction.internalCreateTransaction, |
| 137 'IDBVersionChangeEvent': () => VersionChangeEvent.internalCreateVersionChangeE
vent, |
| 138 |
| 139 }; |
125 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 140 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
126 // for details. All rights reserved. Use of this source code is governed by a | 141 // for details. All rights reserved. Use of this source code is governed by a |
127 // BSD-style license that can be found in the LICENSE file. | 142 // BSD-style license that can be found in the LICENSE file. |
128 | 143 |
129 | 144 |
130 @DomName('IDBCursor') | 145 @DomName('IDBCursor') |
131 @Unstable() | 146 @Unstable() |
132 class Cursor extends NativeFieldWrapperClass2 { | 147 class Cursor extends NativeFieldWrapperClass2 { |
133 @DomName('IDBCursor.delete') | 148 @DomName('IDBCursor.delete') |
134 Future delete() { | 149 Future delete() { |
(...skipping 1236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1371 | 1386 |
1372 @DomName('IDBVersionChangeEvent.newVersion') | 1387 @DomName('IDBVersionChangeEvent.newVersion') |
1373 @DocsEditable() | 1388 @DocsEditable() |
1374 int get newVersion => _blink.BlinkIDBVersionChangeEvent.instance.newVersion_Ge
tter_(unwrap_jso(this)); | 1389 int get newVersion => _blink.BlinkIDBVersionChangeEvent.instance.newVersion_Ge
tter_(unwrap_jso(this)); |
1375 | 1390 |
1376 @DomName('IDBVersionChangeEvent.oldVersion') | 1391 @DomName('IDBVersionChangeEvent.oldVersion') |
1377 @DocsEditable() | 1392 @DocsEditable() |
1378 int get oldVersion => _blink.BlinkIDBVersionChangeEvent.instance.oldVersion_Ge
tter_(unwrap_jso(this)); | 1393 int get oldVersion => _blink.BlinkIDBVersionChangeEvent.instance.oldVersion_Ge
tter_(unwrap_jso(this)); |
1379 | 1394 |
1380 } | 1395 } |
OLD | NEW |