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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 @DomName('IDBCursor.primaryKey') | 257 @DomName('IDBCursor.primaryKey') |
258 @DocsEditable() | 258 @DocsEditable() |
259 @_annotation_Creates_IDBKey | 259 @_annotation_Creates_IDBKey |
260 @_annotation_Returns_IDBKey | 260 @_annotation_Returns_IDBKey |
261 final Object primaryKey; | 261 final Object primaryKey; |
262 | 262 |
263 @DomName('IDBCursor.source') | 263 @DomName('IDBCursor.source') |
264 @DocsEditable() | 264 @DocsEditable() |
265 @Creates('Null') | 265 @Creates('Null') |
266 @Returns('ObjectStore|Index|Null') | 266 @Returns('ObjectStore|Index|Null') |
267 final dynamic source; | 267 final Object source; |
268 | 268 |
269 @DomName('IDBCursor.advance') | 269 @DomName('IDBCursor.advance') |
270 @DocsEditable() | 270 @DocsEditable() |
271 void advance(int count) native; | 271 void advance(int count) native; |
272 | 272 |
| 273 @DomName('IDBCursor.continuePrimaryKey') |
| 274 @DocsEditable() |
| 275 @Experimental() // untriaged |
| 276 void continuePrimaryKey(Object key, Object primaryKey) native; |
| 277 |
273 @JSName('delete') | 278 @JSName('delete') |
274 @DomName('IDBCursor.delete') | 279 @DomName('IDBCursor.delete') |
275 @DocsEditable() | 280 @DocsEditable() |
276 Request _delete() native; | 281 Request _delete() native; |
277 | 282 |
278 @DomName('IDBCursor.update') | 283 @DomName('IDBCursor.update') |
279 @DocsEditable() | 284 @DocsEditable() |
280 Request _update(/*any*/ value) { | 285 Request _update(/*any*/ value) { |
281 var value_1 = convertDartToNative_SerializedScriptValue(value); | 286 var value_1 = convertDartToNative_SerializedScriptValue(value); |
282 return _update_1(value_1); | 287 return _update_1(value_1); |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 @DomName('IDBDatabase.objectStoreNames') | 440 @DomName('IDBDatabase.objectStoreNames') |
436 @DocsEditable() | 441 @DocsEditable() |
437 @Returns('DomStringList') | 442 @Returns('DomStringList') |
438 @Creates('DomStringList') | 443 @Creates('DomStringList') |
439 final List<String> objectStoreNames; | 444 final List<String> objectStoreNames; |
440 | 445 |
441 @DomName('IDBDatabase.version') | 446 @DomName('IDBDatabase.version') |
442 @DocsEditable() | 447 @DocsEditable() |
443 @Creates('int|String|Null') | 448 @Creates('int|String|Null') |
444 @Returns('int|String|Null') | 449 @Returns('int|String|Null') |
445 final dynamic version; | 450 final Object version; |
446 | 451 |
447 @DomName('IDBDatabase.close') | 452 @DomName('IDBDatabase.close') |
448 @DocsEditable() | 453 @DocsEditable() |
449 void close() native; | 454 void close() native; |
450 | 455 |
451 @DomName('IDBDatabase.createObjectStore') | 456 @DomName('IDBDatabase.createObjectStore') |
452 @DocsEditable() | 457 @DocsEditable() |
453 ObjectStore _createObjectStore(String name, [Map options]) { | 458 ObjectStore _createObjectStore(String name, [Map options]) { |
454 if (options != null) { | 459 if (options != null) { |
455 var options_1 = convertDartToNative_Dictionary(options); | 460 var options_1 = convertDartToNative_Dictionary(options); |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
724 } | 729 } |
725 return ObjectStore._cursorStreamFromResult(request, autoAdvance); | 730 return ObjectStore._cursorStreamFromResult(request, autoAdvance); |
726 } | 731 } |
727 | 732 |
728 // To suppress missing implicit constructor warnings. | 733 // To suppress missing implicit constructor warnings. |
729 factory Index._() { throw new UnsupportedError("Not supported"); } | 734 factory Index._() { throw new UnsupportedError("Not supported"); } |
730 | 735 |
731 @DomName('IDBIndex.keyPath') | 736 @DomName('IDBIndex.keyPath') |
732 @DocsEditable() | 737 @DocsEditable() |
733 @annotation_Creates_SerializedScriptValue | 738 @annotation_Creates_SerializedScriptValue |
734 final dynamic keyPath; | 739 final Object keyPath; |
735 | 740 |
736 @DomName('IDBIndex.multiEntry') | 741 @DomName('IDBIndex.multiEntry') |
737 @DocsEditable() | 742 @DocsEditable() |
738 final bool multiEntry; | 743 final bool multiEntry; |
739 | 744 |
740 @DomName('IDBIndex.name') | 745 @DomName('IDBIndex.name') |
741 @DocsEditable() | 746 @DocsEditable() |
742 final String name; | 747 final String name; |
743 | 748 |
744 @DomName('IDBIndex.objectStore') | 749 @DomName('IDBIndex.objectStore') |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1000 | 1005 |
1001 @DomName('IDBObjectStore.indexNames') | 1006 @DomName('IDBObjectStore.indexNames') |
1002 @DocsEditable() | 1007 @DocsEditable() |
1003 @Returns('DomStringList') | 1008 @Returns('DomStringList') |
1004 @Creates('DomStringList') | 1009 @Creates('DomStringList') |
1005 final List<String> indexNames; | 1010 final List<String> indexNames; |
1006 | 1011 |
1007 @DomName('IDBObjectStore.keyPath') | 1012 @DomName('IDBObjectStore.keyPath') |
1008 @DocsEditable() | 1013 @DocsEditable() |
1009 @annotation_Creates_SerializedScriptValue | 1014 @annotation_Creates_SerializedScriptValue |
1010 final dynamic keyPath; | 1015 final Object keyPath; |
1011 | 1016 |
1012 @DomName('IDBObjectStore.name') | 1017 @DomName('IDBObjectStore.name') |
1013 @DocsEditable() | 1018 @DocsEditable() |
1014 final String name; | 1019 final String name; |
1015 | 1020 |
1016 @DomName('IDBObjectStore.transaction') | 1021 @DomName('IDBObjectStore.transaction') |
1017 @DocsEditable() | 1022 @DocsEditable() |
1018 final Transaction transaction; | 1023 final Transaction transaction; |
1019 | 1024 |
1020 @DomName('IDBObjectStore.add') | 1025 @DomName('IDBObjectStore.add') |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1272 dynamic get result => _convertNativeToDart_IDBAny(this._get_result); | 1277 dynamic get result => _convertNativeToDart_IDBAny(this._get_result); |
1273 @JSName('result') | 1278 @JSName('result') |
1274 @DomName('IDBRequest.result') | 1279 @DomName('IDBRequest.result') |
1275 @DocsEditable() | 1280 @DocsEditable() |
1276 @Creates('Null') | 1281 @Creates('Null') |
1277 final dynamic _get_result; | 1282 final dynamic _get_result; |
1278 | 1283 |
1279 @DomName('IDBRequest.source') | 1284 @DomName('IDBRequest.source') |
1280 @DocsEditable() | 1285 @DocsEditable() |
1281 @Creates('Null') | 1286 @Creates('Null') |
1282 final dynamic source; | 1287 final Object source; |
1283 | 1288 |
1284 @DomName('IDBRequest.transaction') | 1289 @DomName('IDBRequest.transaction') |
1285 @DocsEditable() | 1290 @DocsEditable() |
1286 final Transaction transaction; | 1291 final Transaction transaction; |
1287 | 1292 |
1288 /// Stream of `error` events handled by this [Request]. | 1293 /// Stream of `error` events handled by this [Request]. |
1289 @DomName('IDBRequest.onerror') | 1294 @DomName('IDBRequest.onerror') |
1290 @DocsEditable() | 1295 @DocsEditable() |
1291 Stream<Event> get onError => errorEvent.forTarget(this); | 1296 Stream<Event> get onError => errorEvent.forTarget(this); |
1292 | 1297 |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1420 | 1425 |
1421 @DomName('IDBVersionChangeEvent.dataLossMessage') | 1426 @DomName('IDBVersionChangeEvent.dataLossMessage') |
1422 @DocsEditable() | 1427 @DocsEditable() |
1423 @Experimental() // untriaged | 1428 @Experimental() // untriaged |
1424 final String dataLossMessage; | 1429 final String dataLossMessage; |
1425 | 1430 |
1426 @DomName('IDBVersionChangeEvent.newVersion') | 1431 @DomName('IDBVersionChangeEvent.newVersion') |
1427 @DocsEditable() | 1432 @DocsEditable() |
1428 @Creates('int|String|Null') | 1433 @Creates('int|String|Null') |
1429 @Returns('int|String|Null') | 1434 @Returns('int|String|Null') |
1430 final dynamic newVersion; | 1435 final Object newVersion; |
1431 | 1436 |
1432 @DomName('IDBVersionChangeEvent.oldVersion') | 1437 @DomName('IDBVersionChangeEvent.oldVersion') |
1433 @DocsEditable() | 1438 @DocsEditable() |
1434 @Creates('int|String|Null') | 1439 @Creates('int|String|Null') |
1435 @Returns('int|String|Null') | 1440 @Returns('int|String|Null') |
1436 final dynamic oldVersion; | 1441 final Object oldVersion; |
1437 } | 1442 } |
1438 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | |
1439 // for details. All rights reserved. Use of this source code is governed by a | |
1440 // BSD-style license that can be found in the LICENSE file. | |
1441 | |
1442 | |
1443 @DocsEditable() | |
1444 @DomName('IDBAny') | |
1445 @deprecated // nonstandard | |
1446 abstract class _IDBAny extends Interceptor native "IDBAny" { | |
1447 // To suppress missing implicit constructor warnings. | |
1448 factory _IDBAny._() { throw new UnsupportedError("Not supported"); } | |
1449 } | |
OLD | NEW |