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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 @DomName('IDBDatabase.version') | 302 @DomName('IDBDatabase.version') |
303 @DocsEditable() | 303 @DocsEditable() |
304 Object get version => _blink.BlinkIDBDatabase.instance.version_Getter_(unwrap_
jso(this)); | 304 Object get version => _blink.BlinkIDBDatabase.instance.version_Getter_(unwrap_
jso(this)); |
305 | 305 |
306 @DomName('IDBDatabase.close') | 306 @DomName('IDBDatabase.close') |
307 @DocsEditable() | 307 @DocsEditable() |
308 void close() => _blink.BlinkIDBDatabase.instance.close_Callback_0_(unwrap_jso(
this)); | 308 void close() => _blink.BlinkIDBDatabase.instance.close_Callback_0_(unwrap_jso(
this)); |
309 | 309 |
310 ObjectStore _createObjectStore(String name, [Map options]) { | 310 ObjectStore _createObjectStore(String name, [Map options]) { |
311 if (options != null) { | 311 if (options != null) { |
312 return _blink.BlinkIDBDatabase.instance.createObjectStore_Callback_2_(unwr
ap_jso(this), name, options != null ? new js.JsObject.jsify(options) : options); | 312 return _blink.BlinkIDBDatabase.instance.createObjectStore_Callback_2_(unwr
ap_jso(this), name, options); |
313 } | 313 } |
314 return _blink.BlinkIDBDatabase.instance.createObjectStore_Callback_1_(unwrap
_jso(this), name); | 314 return _blink.BlinkIDBDatabase.instance.createObjectStore_Callback_1_(unwrap
_jso(this), name); |
315 } | 315 } |
316 | 316 |
317 @DomName('IDBDatabase.deleteObjectStore') | 317 @DomName('IDBDatabase.deleteObjectStore') |
318 @DocsEditable() | 318 @DocsEditable() |
319 void deleteObjectStore(String name) => _blink.BlinkIDBDatabase.instance.delete
ObjectStore_Callback_1_(unwrap_jso(this), name); | 319 void deleteObjectStore(String name) => _blink.BlinkIDBDatabase.instance.delete
ObjectStore_Callback_1_(unwrap_jso(this), name); |
320 | 320 |
321 Transaction transaction(storeName_OR_storeNames, [String mode]) { | 321 Transaction transaction(storeName_OR_storeNames, [String mode]) { |
322 if ((storeName_OR_storeNames is String || storeName_OR_storeNames == null) &
& mode == null) { | 322 if ((storeName_OR_storeNames is String || storeName_OR_storeNames == null) &
& mode == null) { |
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
904 | 904 |
905 @DomName('IDBObjectStore.count') | 905 @DomName('IDBObjectStore.count') |
906 @DocsEditable() | 906 @DocsEditable() |
907 Request _count(Object key) => wrap_jso(_blink.BlinkIDBObjectStore.instance.cou
nt_Callback_1_(unwrap_jso(this), key)); | 907 Request _count(Object key) => wrap_jso(_blink.BlinkIDBObjectStore.instance.cou
nt_Callback_1_(unwrap_jso(this), key)); |
908 | 908 |
909 Index _createIndex(String name, keyPath, [Map options]) { | 909 Index _createIndex(String name, keyPath, [Map options]) { |
910 if ((keyPath is String || keyPath == null) && (name is String || name == nul
l) && options == null) { | 910 if ((keyPath is String || keyPath == null) && (name is String || name == nul
l) && options == null) { |
911 return _blink.BlinkIDBObjectStore.instance.createIndex_Callback_2_(unwrap_
jso(this), name, unwrap_jso(keyPath)); | 911 return _blink.BlinkIDBObjectStore.instance.createIndex_Callback_2_(unwrap_
jso(this), name, unwrap_jso(keyPath)); |
912 } | 912 } |
913 if ((options is Map || options == null) && (keyPath is String || keyPath ==
null) && (name is String || name == null)) { | 913 if ((options is Map || options == null) && (keyPath is String || keyPath ==
null) && (name is String || name == null)) { |
914 return _blink.BlinkIDBObjectStore.instance.createIndex_Callback_3_(unwrap_
jso(this), name, unwrap_jso(keyPath), options != null ? new js.JsObject.jsify(op
tions) : options); | 914 return _blink.BlinkIDBObjectStore.instance.createIndex_Callback_3_(unwrap_
jso(this), name, unwrap_jso(keyPath), options); |
915 } | 915 } |
916 if ((keyPath is List<String> || keyPath == null) && (name is String || name
== null) && options == null) { | 916 if ((keyPath is List<String> || keyPath == null) && (name is String || name
== null) && options == null) { |
917 return _blink.BlinkIDBObjectStore.instance.createIndex_Callback_2_(unwrap_
jso(this), name, unwrap_jso(keyPath)); | 917 return _blink.BlinkIDBObjectStore.instance.createIndex_Callback_2_(unwrap_
jso(this), name, unwrap_jso(keyPath)); |
918 } | 918 } |
919 if ((options is Map || options == null) && (keyPath is List<String> || keyPa
th == null) && (name is String || name == null)) { | 919 if ((options is Map || options == null) && (keyPath is List<String> || keyPa
th == null) && (name is String || name == null)) { |
920 return _blink.BlinkIDBObjectStore.instance.createIndex_Callback_3_(unwrap_
jso(this), name, unwrap_jso(keyPath), options != null ? new js.JsObject.jsify(op
tions) : options); | 920 return _blink.BlinkIDBObjectStore.instance.createIndex_Callback_3_(unwrap_
jso(this), name, unwrap_jso(keyPath), options); |
921 } | 921 } |
922 throw new ArgumentError("Incorrect number or type of arguments"); | 922 throw new ArgumentError("Incorrect number or type of arguments"); |
923 } | 923 } |
924 | 924 |
925 @DomName('IDBObjectStore.delete') | 925 @DomName('IDBObjectStore.delete') |
926 @DocsEditable() | 926 @DocsEditable() |
927 Request _delete(Object key) => wrap_jso(_blink.BlinkIDBObjectStore.instance.de
lete_Callback_1_(unwrap_jso(this), key)); | 927 Request _delete(Object key) => wrap_jso(_blink.BlinkIDBObjectStore.instance.de
lete_Callback_1_(unwrap_jso(this), key)); |
928 | 928 |
929 @DomName('IDBObjectStore.deleteIndex') | 929 @DomName('IDBObjectStore.deleteIndex') |
930 @DocsEditable() | 930 @DocsEditable() |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1229 | 1229 |
1230 @DomName('IDBVersionChangeEvent.newVersion') | 1230 @DomName('IDBVersionChangeEvent.newVersion') |
1231 @DocsEditable() | 1231 @DocsEditable() |
1232 int get newVersion => _blink.BlinkIDBVersionChangeEvent.instance.newVersion_Ge
tter_(unwrap_jso(this)); | 1232 int get newVersion => _blink.BlinkIDBVersionChangeEvent.instance.newVersion_Ge
tter_(unwrap_jso(this)); |
1233 | 1233 |
1234 @DomName('IDBVersionChangeEvent.oldVersion') | 1234 @DomName('IDBVersionChangeEvent.oldVersion') |
1235 @DocsEditable() | 1235 @DocsEditable() |
1236 int get oldVersion => _blink.BlinkIDBVersionChangeEvent.instance.oldVersion_Ge
tter_(unwrap_jso(this)); | 1236 int get oldVersion => _blink.BlinkIDBVersionChangeEvent.instance.oldVersion_Ge
tter_(unwrap_jso(this)); |
1237 | 1237 |
1238 } | 1238 } |
OLD | NEW |