| OLD | NEW |
| 1 library dart.dom.indexed_db; | 1 library dart.dom.indexed_db; |
| 2 | 2 |
| 3 import 'dart:async'; | 3 import 'dart:async'; |
| 4 import 'dart:html'; | 4 import 'dart:html'; |
| 5 import 'dart:html_common'; | 5 import 'dart:html_common'; |
| 6 import 'dart:nativewrappers'; | 6 import 'dart:nativewrappers'; |
| 7 import 'dart:_blink' as _blink; | 7 import 'dart:_blink' as _blink; |
| 8 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 8 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 9 // for details. All rights reserved. Use of this source code is governed by a | 9 // for details. All rights reserved. Use of this source code is governed by a |
| 10 // BSD-style license that can be found in the LICENSE file. | 10 // BSD-style license that can be found in the LICENSE file. |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 @DomName('IDBCursor.primaryKey') | 89 @DomName('IDBCursor.primaryKey') |
| 90 @DocsEditable() | 90 @DocsEditable() |
| 91 Object get primaryKey => _blink.BlinkIDBCursor.primaryKey_Getter(this); | 91 Object get primaryKey => _blink.BlinkIDBCursor.primaryKey_Getter(this); |
| 92 | 92 |
| 93 @DomName('IDBCursor.source') | 93 @DomName('IDBCursor.source') |
| 94 @DocsEditable() | 94 @DocsEditable() |
| 95 Object get source => _blink.BlinkIDBCursor.source_Getter(this); | 95 Object get source => _blink.BlinkIDBCursor.source_Getter(this); |
| 96 | 96 |
| 97 @DomName('IDBCursor.advance') | 97 @DomName('IDBCursor.advance') |
| 98 @DocsEditable() | 98 @DocsEditable() |
| 99 void advance(int count) => _blink.BlinkIDBCursor.advance_Callback_ul(this, cou
nt); | 99 void advance(int count) => _blink.BlinkIDBCursor.advance_Callback_1(this, coun
t); |
| 100 | 100 |
| 101 @DomName('IDBCursor.continuePrimaryKey') | 101 @DomName('IDBCursor.continuePrimaryKey') |
| 102 @DocsEditable() | 102 @DocsEditable() |
| 103 @Experimental() // untriaged | 103 @Experimental() // untriaged |
| 104 void continuePrimaryKey(Object key, Object primaryKey) => _blink.BlinkIDBCurso
r.continuePrimaryKey_Callback_ScriptValue_ScriptValue(this, key, primaryKey); | 104 void continuePrimaryKey(Object key, Object primaryKey) => _blink.BlinkIDBCurso
r.continuePrimaryKey_Callback_2(this, key, primaryKey); |
| 105 | 105 |
| 106 @DomName('IDBCursor.delete') | 106 @DomName('IDBCursor.delete') |
| 107 @DocsEditable() | 107 @DocsEditable() |
| 108 Request _delete() => _blink.BlinkIDBCursor.delete_Callback(this); | 108 Request _delete() => _blink.BlinkIDBCursor.delete_Callback(this); |
| 109 | 109 |
| 110 @DomName('IDBCursor.next') | 110 void next([Object key]) { |
| 111 @DocsEditable() | 111 if (key != null) { |
| 112 @Experimental() // non-standard | 112 _blink.BlinkIDBCursor.continue_Callback_1(this, key); |
| 113 void next([Object key]) => _blink.BlinkIDBCursor.continue_Callback_ScriptValue
(this, key); | 113 return; |
| 114 } |
| 115 _blink.BlinkIDBCursor.continue_Callback(this); |
| 116 return; |
| 117 } |
| 114 | 118 |
| 115 @DomName('IDBCursor.update') | 119 @DomName('IDBCursor.update') |
| 116 @DocsEditable() | 120 @DocsEditable() |
| 117 Request _update(Object value) => _blink.BlinkIDBCursor.update_Callback_ScriptV
alue(this, value); | 121 Request _update(Object value) => _blink.BlinkIDBCursor.update_Callback_1(this,
value); |
| 118 | 122 |
| 119 } | 123 } |
| 120 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 124 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 121 // for details. All rights reserved. Use of this source code is governed by a | 125 // for details. All rights reserved. Use of this source code is governed by a |
| 122 // BSD-style license that can be found in the LICENSE file. | 126 // BSD-style license that can be found in the LICENSE file. |
| 123 | 127 |
| 124 // WARNING: Do not edit - generated code. | 128 // WARNING: Do not edit - generated code. |
| 125 | 129 |
| 126 | 130 |
| 127 @DocsEditable() | 131 @DocsEditable() |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 List<String> get objectStoreNames => _blink.BlinkIDBDatabase.objectStoreNames_
Getter(this); | 227 List<String> get objectStoreNames => _blink.BlinkIDBDatabase.objectStoreNames_
Getter(this); |
| 224 | 228 |
| 225 @DomName('IDBDatabase.version') | 229 @DomName('IDBDatabase.version') |
| 226 @DocsEditable() | 230 @DocsEditable() |
| 227 Object get version => _blink.BlinkIDBDatabase.version_Getter(this); | 231 Object get version => _blink.BlinkIDBDatabase.version_Getter(this); |
| 228 | 232 |
| 229 @DomName('IDBDatabase.close') | 233 @DomName('IDBDatabase.close') |
| 230 @DocsEditable() | 234 @DocsEditable() |
| 231 void close() => _blink.BlinkIDBDatabase.close_Callback(this); | 235 void close() => _blink.BlinkIDBDatabase.close_Callback(this); |
| 232 | 236 |
| 233 @DomName('IDBDatabase.createObjectStore') | 237 ObjectStore _createObjectStore(String name, [Map options]) { |
| 234 @DocsEditable() | 238 if (options != null) { |
| 235 ObjectStore _createObjectStore(String name, [Map options]) => _blink.BlinkIDBD
atabase.createObjectStore_Callback_DOMString_Dictionary(this, name, options); | 239 return _blink.BlinkIDBDatabase.createObjectStore_Callback_2(this, name, op
tions); |
| 240 } |
| 241 return _blink.BlinkIDBDatabase.createObjectStore_Callback_1(this, name); |
| 242 } |
| 236 | 243 |
| 237 @DomName('IDBDatabase.deleteObjectStore') | 244 @DomName('IDBDatabase.deleteObjectStore') |
| 238 @DocsEditable() | 245 @DocsEditable() |
| 239 void deleteObjectStore(String name) => _blink.BlinkIDBDatabase.deleteObjectSto
re_Callback_DOMString(this, name); | 246 void deleteObjectStore(String name) => _blink.BlinkIDBDatabase.deleteObjectSto
re_Callback_1(this, name); |
| 240 | 247 |
| 241 Transaction transaction(storeName_OR_storeNames, [String mode]) { | 248 Transaction transaction(storeName_OR_storeNames, [String mode]) { |
| 242 if ((storeName_OR_storeNames is String || storeName_OR_storeNames == null) &
& mode == null) { | 249 if ((storeName_OR_storeNames is String || storeName_OR_storeNames == null) &
& mode == null) { |
| 243 return _blink.BlinkIDBDatabase.transaction_Callback_DOMString(this, storeN
ame_OR_storeNames); | 250 return _blink.BlinkIDBDatabase.transaction_Callback_1(this, storeName_OR_s
toreNames); |
| 244 } | 251 } |
| 245 if ((mode is String || mode == null) && (storeName_OR_storeNames is String |
| storeName_OR_storeNames == null)) { | 252 if ((mode is String || mode == null) && (storeName_OR_storeNames is String |
| storeName_OR_storeNames == null)) { |
| 246 return _blink.BlinkIDBDatabase.transaction_Callback_DOMString_DOMString(th
is, storeName_OR_storeNames, mode); | 253 return _blink.BlinkIDBDatabase.transaction_Callback_2(this, storeName_OR_s
toreNames, mode); |
| 247 } | 254 } |
| 248 if ((storeName_OR_storeNames is List<String> || storeName_OR_storeNames == n
ull) && mode == null) { | 255 if ((storeName_OR_storeNames is List<String> || storeName_OR_storeNames == n
ull) && mode == null) { |
| 249 return _blink.BlinkIDBDatabase.transaction_Callback_SEQ_DOMString_SEQ(this
, storeName_OR_storeNames); | 256 return _blink.BlinkIDBDatabase.transaction_Callback_1(this, storeName_OR_s
toreNames); |
| 250 } | 257 } |
| 251 if ((mode is String || mode == null) && (storeName_OR_storeNames is List<Str
ing> || storeName_OR_storeNames == null)) { | 258 if ((mode is String || mode == null) && (storeName_OR_storeNames is List<Str
ing> || storeName_OR_storeNames == null)) { |
| 252 return _blink.BlinkIDBDatabase.transaction_Callback_SEQ_DOMString_SEQ_DOMS
tring(this, storeName_OR_storeNames, mode); | 259 return _blink.BlinkIDBDatabase.transaction_Callback_2(this, storeName_OR_s
toreNames, mode); |
| 253 } | 260 } |
| 254 if ((storeName_OR_storeNames is DomStringList || storeName_OR_storeNames ==
null) && mode == null) { | 261 if ((storeName_OR_storeNames is DomStringList || storeName_OR_storeNames ==
null) && mode == null) { |
| 255 return _blink.BlinkIDBDatabase.transaction_Callback_DOMStringList(this, st
oreName_OR_storeNames); | 262 return _blink.BlinkIDBDatabase.transaction_Callback_1(this, storeName_OR_s
toreNames); |
| 256 } | 263 } |
| 257 if ((mode is String || mode == null) && (storeName_OR_storeNames is DomStrin
gList || storeName_OR_storeNames == null)) { | 264 if ((mode is String || mode == null) && (storeName_OR_storeNames is DomStrin
gList || storeName_OR_storeNames == null)) { |
| 258 return _blink.BlinkIDBDatabase.transaction_Callback_DOMStringList_DOMStrin
g(this, storeName_OR_storeNames, mode); | 265 return _blink.BlinkIDBDatabase.transaction_Callback_2(this, storeName_OR_s
toreNames, mode); |
| 259 } | 266 } |
| 260 throw new ArgumentError("Incorrect number or type of arguments"); | 267 throw new ArgumentError("Incorrect number or type of arguments"); |
| 261 } | 268 } |
| 262 | 269 |
| 263 Transaction transactionList(List<String> storeNames, [String mode]) { | 270 Transaction transactionList(List<String> storeNames, [String mode]) { |
| 264 if (mode != null) { | 271 if (mode != null) { |
| 265 return _blink.BlinkIDBDatabase.transaction_Callback_SEQ_DOMString_SEQ_DOMS
tring(this, storeNames, mode); | 272 return _blink.BlinkIDBDatabase.transaction_Callback_2(this, storeNames, mo
de); |
| 266 } | 273 } |
| 267 return _blink.BlinkIDBDatabase.transaction_Callback_SEQ_DOMString_SEQ(this,
storeNames); | 274 return _blink.BlinkIDBDatabase.transaction_Callback_1(this, storeNames); |
| 268 } | 275 } |
| 269 | 276 |
| 270 Transaction transactionStore(String storeName, [String mode]) { | 277 Transaction transactionStore(String storeName, [String mode]) { |
| 271 if (mode != null) { | 278 if (mode != null) { |
| 272 return _blink.BlinkIDBDatabase.transaction_Callback_DOMString_DOMString(th
is, storeName, mode); | 279 return _blink.BlinkIDBDatabase.transaction_Callback_2(this, storeName, mod
e); |
| 273 } | 280 } |
| 274 return _blink.BlinkIDBDatabase.transaction_Callback_DOMString(this, storeNam
e); | 281 return _blink.BlinkIDBDatabase.transaction_Callback_1(this, storeName); |
| 275 } | 282 } |
| 276 | 283 |
| 277 Transaction transactionStores(List<String> storeNames, [String mode]) { | 284 Transaction transactionStores(List<String> storeNames, [String mode]) { |
| 278 if (mode != null) { | 285 if (mode != null) { |
| 279 return _blink.BlinkIDBDatabase.transaction_Callback_DOMStringList_DOMStrin
g(this, storeNames, mode); | 286 return _blink.BlinkIDBDatabase.transaction_Callback_2(this, storeNames, mo
de); |
| 280 } | 287 } |
| 281 return _blink.BlinkIDBDatabase.transaction_Callback_DOMStringList(this, stor
eNames); | 288 return _blink.BlinkIDBDatabase.transaction_Callback_1(this, storeNames); |
| 282 } | 289 } |
| 283 | 290 |
| 284 /// Stream of `abort` events handled by this [Database]. | 291 /// Stream of `abort` events handled by this [Database]. |
| 285 @DomName('IDBDatabase.onabort') | 292 @DomName('IDBDatabase.onabort') |
| 286 @DocsEditable() | 293 @DocsEditable() |
| 287 Stream<Event> get onAbort => abortEvent.forTarget(this); | 294 Stream<Event> get onAbort => abortEvent.forTarget(this); |
| 288 | 295 |
| 289 /// Stream of `close` events handled by this [Database]. | 296 /// Stream of `close` events handled by this [Database]. |
| 290 @DomName('IDBDatabase.onclose') | 297 @DomName('IDBDatabase.onclose') |
| 291 @DocsEditable() | 298 @DocsEditable() |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 */ | 395 */ |
| 389 bool get supportsDatabaseNames { | 396 bool get supportsDatabaseNames { |
| 390 return true; | 397 return true; |
| 391 } | 398 } |
| 392 | 399 |
| 393 // To suppress missing implicit constructor warnings. | 400 // To suppress missing implicit constructor warnings. |
| 394 factory IdbFactory._() { throw new UnsupportedError("Not supported"); } | 401 factory IdbFactory._() { throw new UnsupportedError("Not supported"); } |
| 395 | 402 |
| 396 @DomName('IDBFactory.cmp') | 403 @DomName('IDBFactory.cmp') |
| 397 @DocsEditable() | 404 @DocsEditable() |
| 398 int cmp(Object first, Object second) => _blink.BlinkIDBFactory.cmp_Callback_Sc
riptValue_ScriptValue(this, first, second); | 405 int cmp(Object first, Object second) => _blink.BlinkIDBFactory.cmp_Callback_2(
this, first, second); |
| 399 | 406 |
| 400 @DomName('IDBFactory.deleteDatabase') | 407 @DomName('IDBFactory.deleteDatabase') |
| 401 @DocsEditable() | 408 @DocsEditable() |
| 402 OpenDBRequest _deleteDatabase(String name) => _blink.BlinkIDBFactory.deleteDat
abase_Callback_DOMString(this, name); | 409 OpenDBRequest _deleteDatabase(String name) => _blink.BlinkIDBFactory.deleteDat
abase_Callback_1(this, name); |
| 403 | 410 |
| 404 OpenDBRequest _open(String name, [int version]) { | 411 OpenDBRequest _open(String name, [int version]) { |
| 405 if (version != null) { | 412 if (version != null) { |
| 406 return _blink.BlinkIDBFactory.open_Callback_DOMString_ull(this, name, vers
ion); | 413 return _blink.BlinkIDBFactory.open_Callback_2(this, name, version); |
| 407 } | 414 } |
| 408 return _blink.BlinkIDBFactory.open_Callback_DOMString(this, name); | 415 return _blink.BlinkIDBFactory.open_Callback_1(this, name); |
| 409 } | 416 } |
| 410 | 417 |
| 411 @DomName('IDBFactory.webkitGetDatabaseNames') | 418 @DomName('IDBFactory.webkitGetDatabaseNames') |
| 412 @DocsEditable() | 419 @DocsEditable() |
| 413 @SupportedBrowser(SupportedBrowser.CHROME) | 420 @SupportedBrowser(SupportedBrowser.CHROME) |
| 414 @SupportedBrowser(SupportedBrowser.SAFARI) | 421 @SupportedBrowser(SupportedBrowser.SAFARI) |
| 415 @Experimental() | 422 @Experimental() |
| 416 Request _webkitGetDatabaseNames() => _blink.BlinkIDBFactory.webkitGetDatabaseN
ames_Callback(this); | 423 Request _webkitGetDatabaseNames() => _blink.BlinkIDBFactory.webkitGetDatabaseN
ames_Callback(this); |
| 417 | 424 |
| 418 } | 425 } |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 @DomName('IDBIndex.objectStore') | 553 @DomName('IDBIndex.objectStore') |
| 547 @DocsEditable() | 554 @DocsEditable() |
| 548 ObjectStore get objectStore => _blink.BlinkIDBIndex.objectStore_Getter(this); | 555 ObjectStore get objectStore => _blink.BlinkIDBIndex.objectStore_Getter(this); |
| 549 | 556 |
| 550 @DomName('IDBIndex.unique') | 557 @DomName('IDBIndex.unique') |
| 551 @DocsEditable() | 558 @DocsEditable() |
| 552 bool get unique => _blink.BlinkIDBIndex.unique_Getter(this); | 559 bool get unique => _blink.BlinkIDBIndex.unique_Getter(this); |
| 553 | 560 |
| 554 @DomName('IDBIndex.count') | 561 @DomName('IDBIndex.count') |
| 555 @DocsEditable() | 562 @DocsEditable() |
| 556 Request _count(Object key) => _blink.BlinkIDBIndex.count_Callback_ScriptValue(
this, key); | 563 Request _count(Object key) => _blink.BlinkIDBIndex.count_Callback_1(this, key)
; |
| 557 | 564 |
| 558 @DomName('IDBIndex.get') | 565 @DomName('IDBIndex.get') |
| 559 @DocsEditable() | 566 @DocsEditable() |
| 560 Request _get(Object key) => _blink.BlinkIDBIndex.get_Callback_ScriptValue(this
, key); | 567 Request _get(Object key) => _blink.BlinkIDBIndex.get_Callback_1(this, key); |
| 561 | 568 |
| 562 @DomName('IDBIndex.getKey') | 569 @DomName('IDBIndex.getKey') |
| 563 @DocsEditable() | 570 @DocsEditable() |
| 564 Request _getKey(Object key) => _blink.BlinkIDBIndex.getKey_Callback_ScriptValu
e(this, key); | 571 Request _getKey(Object key) => _blink.BlinkIDBIndex.getKey_Callback_1(this, ke
y); |
| 565 | 572 |
| 566 Request _openCursor(Object range, [String direction]) { | 573 Request _openCursor(Object range, [String direction]) { |
| 567 if (direction != null) { | 574 if (direction != null) { |
| 568 return _blink.BlinkIDBIndex.openCursor_Callback_ScriptValue_DOMString(this
, range, direction); | 575 return _blink.BlinkIDBIndex.openCursor_Callback_2(this, range, direction); |
| 569 } | 576 } |
| 570 return _blink.BlinkIDBIndex.openCursor_Callback_ScriptValue(this, range); | 577 return _blink.BlinkIDBIndex.openCursor_Callback_1(this, range); |
| 571 } | 578 } |
| 572 | 579 |
| 573 Request _openKeyCursor(Object range, [String direction]) { | 580 Request _openKeyCursor(Object range, [String direction]) { |
| 574 if (direction != null) { | 581 if (direction != null) { |
| 575 return _blink.BlinkIDBIndex.openKeyCursor_Callback_ScriptValue_DOMString(t
his, range, direction); | 582 return _blink.BlinkIDBIndex.openKeyCursor_Callback_2(this, range, directio
n); |
| 576 } | 583 } |
| 577 return _blink.BlinkIDBIndex.openKeyCursor_Callback_ScriptValue(this, range); | 584 return _blink.BlinkIDBIndex.openKeyCursor_Callback_1(this, range); |
| 578 } | 585 } |
| 579 | 586 |
| 580 } | 587 } |
| 581 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 588 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 582 // for details. All rights reserved. Use of this source code is governed by a | 589 // for details. All rights reserved. Use of this source code is governed by a |
| 583 // BSD-style license that can be found in the LICENSE file. | 590 // BSD-style license that can be found in the LICENSE file. |
| 584 | 591 |
| 585 | 592 |
| 586 @DomName('IDBKeyRange') | 593 @DomName('IDBKeyRange') |
| 587 @Unstable() | 594 @Unstable() |
| (...skipping 28 matching lines...) Expand all Loading... |
| 616 bool get lowerOpen => _blink.BlinkIDBKeyRange.lowerOpen_Getter(this); | 623 bool get lowerOpen => _blink.BlinkIDBKeyRange.lowerOpen_Getter(this); |
| 617 | 624 |
| 618 @DomName('IDBKeyRange.upper') | 625 @DomName('IDBKeyRange.upper') |
| 619 @DocsEditable() | 626 @DocsEditable() |
| 620 Object get upper => _blink.BlinkIDBKeyRange.upper_Getter(this); | 627 Object get upper => _blink.BlinkIDBKeyRange.upper_Getter(this); |
| 621 | 628 |
| 622 @DomName('IDBKeyRange.upperOpen') | 629 @DomName('IDBKeyRange.upperOpen') |
| 623 @DocsEditable() | 630 @DocsEditable() |
| 624 bool get upperOpen => _blink.BlinkIDBKeyRange.upperOpen_Getter(this); | 631 bool get upperOpen => _blink.BlinkIDBKeyRange.upperOpen_Getter(this); |
| 625 | 632 |
| 626 @DomName('IDBKeyRange.bound_') | 633 static KeyRange bound_(Object lower, Object upper, [bool lowerOpen, bool upper
Open]) { |
| 627 @DocsEditable() | 634 if (upperOpen != null) { |
| 628 @Experimental() // non-standard | 635 return _blink.BlinkIDBKeyRange.bound_Callback_4(lower, upper, lowerOpen, u
pperOpen); |
| 629 static KeyRange bound_(Object lower, Object upper, [bool lowerOpen, bool upper
Open]) => _blink.BlinkIDBKeyRange.bound_Callback_ScriptValue_ScriptValue_boolean
_boolean(lower, upper, lowerOpen, upperOpen); | 636 } |
| 637 if (lowerOpen != null) { |
| 638 return _blink.BlinkIDBKeyRange.bound_Callback_3(lower, upper, lowerOpen); |
| 639 } |
| 640 return _blink.BlinkIDBKeyRange.bound_Callback_2(lower, upper); |
| 641 } |
| 630 | 642 |
| 631 @DomName('IDBKeyRange.lowerBound_') | 643 static KeyRange lowerBound_(Object bound, [bool open]) { |
| 632 @DocsEditable() | 644 if (open != null) { |
| 633 @Experimental() // non-standard | 645 return _blink.BlinkIDBKeyRange.lowerBound_Callback_2(bound, open); |
| 634 static KeyRange lowerBound_(Object bound, [bool open]) => _blink.BlinkIDBKeyRa
nge.lowerBound_Callback_ScriptValue_boolean(bound, open); | 646 } |
| 647 return _blink.BlinkIDBKeyRange.lowerBound_Callback_1(bound); |
| 648 } |
| 635 | 649 |
| 636 @DomName('IDBKeyRange.only_') | 650 @DomName('IDBKeyRange.only_') |
| 637 @DocsEditable() | 651 @DocsEditable() |
| 638 @Experimental() // non-standard | 652 @Experimental() // non-standard |
| 639 static KeyRange only_(Object value) => _blink.BlinkIDBKeyRange.only_Callback_S
criptValue(value); | 653 static KeyRange only_(Object value) => _blink.BlinkIDBKeyRange.only_Callback_1
(value); |
| 640 | 654 |
| 641 @DomName('IDBKeyRange.upperBound_') | 655 static KeyRange upperBound_(Object bound, [bool open]) { |
| 642 @DocsEditable() | 656 if (open != null) { |
| 643 @Experimental() // non-standard | 657 return _blink.BlinkIDBKeyRange.upperBound_Callback_2(bound, open); |
| 644 static KeyRange upperBound_(Object bound, [bool open]) => _blink.BlinkIDBKeyRa
nge.upperBound_Callback_ScriptValue_boolean(bound, open); | 658 } |
| 659 return _blink.BlinkIDBKeyRange.upperBound_Callback_1(bound); |
| 660 } |
| 645 | 661 |
| 646 } | 662 } |
| 647 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 663 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 648 // for details. All rights reserved. Use of this source code is governed by a | 664 // for details. All rights reserved. Use of this source code is governed by a |
| 649 // BSD-style license that can be found in the LICENSE file. | 665 // BSD-style license that can be found in the LICENSE file. |
| 650 | 666 |
| 651 | 667 |
| 652 @DomName('IDBObjectStore') | 668 @DomName('IDBObjectStore') |
| 653 @Unstable() | 669 @Unstable() |
| 654 class ObjectStore extends NativeFieldWrapperClass2 { | 670 class ObjectStore extends NativeFieldWrapperClass2 { |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 795 Object get keyPath => _blink.BlinkIDBObjectStore.keyPath_Getter(this); | 811 Object get keyPath => _blink.BlinkIDBObjectStore.keyPath_Getter(this); |
| 796 | 812 |
| 797 @DomName('IDBObjectStore.name') | 813 @DomName('IDBObjectStore.name') |
| 798 @DocsEditable() | 814 @DocsEditable() |
| 799 String get name => _blink.BlinkIDBObjectStore.name_Getter(this); | 815 String get name => _blink.BlinkIDBObjectStore.name_Getter(this); |
| 800 | 816 |
| 801 @DomName('IDBObjectStore.transaction') | 817 @DomName('IDBObjectStore.transaction') |
| 802 @DocsEditable() | 818 @DocsEditable() |
| 803 Transaction get transaction => _blink.BlinkIDBObjectStore.transaction_Getter(t
his); | 819 Transaction get transaction => _blink.BlinkIDBObjectStore.transaction_Getter(t
his); |
| 804 | 820 |
| 805 @DomName('IDBObjectStore.add') | 821 Request _add(Object value, [Object key]) { |
| 806 @DocsEditable() | 822 if (key != null) { |
| 807 Request _add(Object value, [Object key]) => _blink.BlinkIDBObjectStore.add_Cal
lback_ScriptValue_ScriptValue(this, value, key); | 823 return _blink.BlinkIDBObjectStore.add_Callback_2(this, value, key); |
| 824 } |
| 825 return _blink.BlinkIDBObjectStore.add_Callback_1(this, value); |
| 826 } |
| 808 | 827 |
| 809 @DomName('IDBObjectStore.clear') | 828 @DomName('IDBObjectStore.clear') |
| 810 @DocsEditable() | 829 @DocsEditable() |
| 811 Request _clear() => _blink.BlinkIDBObjectStore.clear_Callback(this); | 830 Request _clear() => _blink.BlinkIDBObjectStore.clear_Callback(this); |
| 812 | 831 |
| 813 @DomName('IDBObjectStore.count') | 832 @DomName('IDBObjectStore.count') |
| 814 @DocsEditable() | 833 @DocsEditable() |
| 815 Request _count(Object key) => _blink.BlinkIDBObjectStore.count_Callback_Script
Value(this, key); | 834 Request _count(Object key) => _blink.BlinkIDBObjectStore.count_Callback_1(this
, key); |
| 816 | 835 |
| 817 Index _createIndex(String name, keyPath, [Map options]) { | 836 Index _createIndex(String name, keyPath, [Map options]) { |
| 837 if ((keyPath is String || keyPath == null) && (name is String || name == nul
l) && options == null) { |
| 838 return _blink.BlinkIDBObjectStore.createIndex_Callback_2(this, name, keyPa
th); |
| 839 } |
| 818 if ((options is Map || options == null) && (keyPath is String || keyPath ==
null) && (name is String || name == null)) { | 840 if ((options is Map || options == null) && (keyPath is String || keyPath ==
null) && (name is String || name == null)) { |
| 819 return _blink.BlinkIDBObjectStore.createIndex_Callback_DOMString_DOMString
_Dictionary(this, name, keyPath, options); | 841 return _blink.BlinkIDBObjectStore.createIndex_Callback_3(this, name, keyPa
th, options); |
| 842 } |
| 843 if ((keyPath is List<String> || keyPath == null) && (name is String || name
== null) && options == null) { |
| 844 return _blink.BlinkIDBObjectStore.createIndex_Callback_2(this, name, keyPa
th); |
| 820 } | 845 } |
| 821 if ((options is Map || options == null) && (keyPath is List<String> || keyPa
th == null) && (name is String || name == null)) { | 846 if ((options is Map || options == null) && (keyPath is List<String> || keyPa
th == null) && (name is String || name == null)) { |
| 822 return _blink.BlinkIDBObjectStore.createIndex_Callback_DOMString_SEQ_DOMSt
ring_SEQ_Dictionary(this, name, keyPath, options); | 847 return _blink.BlinkIDBObjectStore.createIndex_Callback_3(this, name, keyPa
th, options); |
| 823 } | 848 } |
| 824 throw new ArgumentError("Incorrect number or type of arguments"); | 849 throw new ArgumentError("Incorrect number or type of arguments"); |
| 825 } | 850 } |
| 826 | 851 |
| 827 @DomName('IDBObjectStore.delete') | 852 @DomName('IDBObjectStore.delete') |
| 828 @DocsEditable() | 853 @DocsEditable() |
| 829 Request _delete(Object key) => _blink.BlinkIDBObjectStore.delete_Callback_Scri
ptValue(this, key); | 854 Request _delete(Object key) => _blink.BlinkIDBObjectStore.delete_Callback_1(th
is, key); |
| 830 | 855 |
| 831 @DomName('IDBObjectStore.deleteIndex') | 856 @DomName('IDBObjectStore.deleteIndex') |
| 832 @DocsEditable() | 857 @DocsEditable() |
| 833 void deleteIndex(String name) => _blink.BlinkIDBObjectStore.deleteIndex_Callba
ck_DOMString(this, name); | 858 void deleteIndex(String name) => _blink.BlinkIDBObjectStore.deleteIndex_Callba
ck_1(this, name); |
| 834 | 859 |
| 835 @DomName('IDBObjectStore.get') | 860 @DomName('IDBObjectStore.get') |
| 836 @DocsEditable() | 861 @DocsEditable() |
| 837 Request _get(Object key) => _blink.BlinkIDBObjectStore.get_Callback_ScriptValu
e(this, key); | 862 Request _get(Object key) => _blink.BlinkIDBObjectStore.get_Callback_1(this, ke
y); |
| 838 | 863 |
| 839 @DomName('IDBObjectStore.index') | 864 @DomName('IDBObjectStore.index') |
| 840 @DocsEditable() | 865 @DocsEditable() |
| 841 Index index(String name) => _blink.BlinkIDBObjectStore.index_Callback_DOMStrin
g(this, name); | 866 Index index(String name) => _blink.BlinkIDBObjectStore.index_Callback_1(this,
name); |
| 842 | 867 |
| 843 @DomName('IDBObjectStore.openCursor') | 868 Request _openCursor(Object range, [String direction]) { |
| 844 @DocsEditable() | 869 if (direction != null) { |
| 845 Request _openCursor(Object range, [String direction]) => _blink.BlinkIDBObject
Store.openCursor_Callback_ScriptValue_DOMString(this, range, direction); | 870 return _blink.BlinkIDBObjectStore.openCursor_Callback_2(this, range, direc
tion); |
| 871 } |
| 872 return _blink.BlinkIDBObjectStore.openCursor_Callback_1(this, range); |
| 873 } |
| 846 | 874 |
| 847 Request openKeyCursor(Object range, [String direction]) { | 875 Request openKeyCursor(Object range, [String direction]) { |
| 848 if (direction != null) { | 876 if (direction != null) { |
| 849 return _blink.BlinkIDBObjectStore.openKeyCursor_Callback_ScriptValue_DOMSt
ring(this, range, direction); | 877 return _blink.BlinkIDBObjectStore.openKeyCursor_Callback_2(this, range, di
rection); |
| 850 } | 878 } |
| 851 return _blink.BlinkIDBObjectStore.openKeyCursor_Callback_ScriptValue(this, r
ange); | 879 return _blink.BlinkIDBObjectStore.openKeyCursor_Callback_1(this, range); |
| 852 } | 880 } |
| 853 | 881 |
| 854 @DomName('IDBObjectStore.put') | 882 Request _put(Object value, [Object key]) { |
| 855 @DocsEditable() | 883 if (key != null) { |
| 856 Request _put(Object value, [Object key]) => _blink.BlinkIDBObjectStore.put_Cal
lback_ScriptValue_ScriptValue(this, value, key); | 884 return _blink.BlinkIDBObjectStore.put_Callback_2(this, value, key); |
| 885 } |
| 886 return _blink.BlinkIDBObjectStore.put_Callback_1(this, value); |
| 887 } |
| 857 | 888 |
| 858 | 889 |
| 859 /** | 890 /** |
| 860 * Helper for iterating over cursors in a request. | 891 * Helper for iterating over cursors in a request. |
| 861 */ | 892 */ |
| 862 static Stream<Cursor> _cursorStreamFromResult(Request request, | 893 static Stream<Cursor> _cursorStreamFromResult(Request request, |
| 863 bool autoAdvance) { | 894 bool autoAdvance) { |
| 864 // TODO: need to guarantee that the controller provides the values | 895 // TODO: need to guarantee that the controller provides the values |
| 865 // immediately as waiting until the next tick will cause the transaction to | 896 // immediately as waiting until the next tick will cause the transaction to |
| 866 // close. | 897 // close. |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1074 @DomName('IDBTransaction.mode') | 1105 @DomName('IDBTransaction.mode') |
| 1075 @DocsEditable() | 1106 @DocsEditable() |
| 1076 String get mode => _blink.BlinkIDBTransaction.mode_Getter(this); | 1107 String get mode => _blink.BlinkIDBTransaction.mode_Getter(this); |
| 1077 | 1108 |
| 1078 @DomName('IDBTransaction.abort') | 1109 @DomName('IDBTransaction.abort') |
| 1079 @DocsEditable() | 1110 @DocsEditable() |
| 1080 void abort() => _blink.BlinkIDBTransaction.abort_Callback(this); | 1111 void abort() => _blink.BlinkIDBTransaction.abort_Callback(this); |
| 1081 | 1112 |
| 1082 @DomName('IDBTransaction.objectStore') | 1113 @DomName('IDBTransaction.objectStore') |
| 1083 @DocsEditable() | 1114 @DocsEditable() |
| 1084 ObjectStore objectStore(String name) => _blink.BlinkIDBTransaction.objectStore
_Callback_DOMString(this, name); | 1115 ObjectStore objectStore(String name) => _blink.BlinkIDBTransaction.objectStore
_Callback_1(this, name); |
| 1085 | 1116 |
| 1086 /// Stream of `abort` events handled by this [Transaction]. | 1117 /// Stream of `abort` events handled by this [Transaction]. |
| 1087 @DomName('IDBTransaction.onabort') | 1118 @DomName('IDBTransaction.onabort') |
| 1088 @DocsEditable() | 1119 @DocsEditable() |
| 1089 Stream<Event> get onAbort => abortEvent.forTarget(this); | 1120 Stream<Event> get onAbort => abortEvent.forTarget(this); |
| 1090 | 1121 |
| 1091 /// Stream of `complete` events handled by this [Transaction]. | 1122 /// Stream of `complete` events handled by this [Transaction]. |
| 1092 @DomName('IDBTransaction.oncomplete') | 1123 @DomName('IDBTransaction.oncomplete') |
| 1093 @DocsEditable() | 1124 @DocsEditable() |
| 1094 Stream<Event> get onComplete => completeEvent.forTarget(this); | 1125 Stream<Event> get onComplete => completeEvent.forTarget(this); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 1125 | 1156 |
| 1126 @DomName('IDBVersionChangeEvent.newVersion') | 1157 @DomName('IDBVersionChangeEvent.newVersion') |
| 1127 @DocsEditable() | 1158 @DocsEditable() |
| 1128 int get newVersion => _blink.BlinkIDBVersionChangeEvent.newVersion_Getter(this
); | 1159 int get newVersion => _blink.BlinkIDBVersionChangeEvent.newVersion_Getter(this
); |
| 1129 | 1160 |
| 1130 @DomName('IDBVersionChangeEvent.oldVersion') | 1161 @DomName('IDBVersionChangeEvent.oldVersion') |
| 1131 @DocsEditable() | 1162 @DocsEditable() |
| 1132 int get oldVersion => _blink.BlinkIDBVersionChangeEvent.oldVersion_Getter(this
); | 1163 int get oldVersion => _blink.BlinkIDBVersionChangeEvent.oldVersion_Getter(this
); |
| 1133 | 1164 |
| 1134 } | 1165 } |
| OLD | NEW |