| OLD | NEW |
| 1 library indexed_db; | 1 library 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 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 7 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 8 // for details. All rights reserved. Use of this source code is governed by a | 8 // for details. All rights reserved. Use of this source code is governed by a |
| 9 // BSD-style license that can be found in the LICENSE file. | 9 // BSD-style license that can be found in the LICENSE file. |
| 10 | 10 |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 void deleteObjectStore(String name) native "IDBDatabase_deleteObjectStore_Call
back"; | 159 void deleteObjectStore(String name) native "IDBDatabase_deleteObjectStore_Call
back"; |
| 160 | 160 |
| 161 | 161 |
| 162 /** @domName IDBDatabase.dispatchEvent */ | 162 /** @domName IDBDatabase.dispatchEvent */ |
| 163 bool $dom_dispatchEvent(Event evt) native "IDBDatabase_dispatchEvent_Callback"
; | 163 bool $dom_dispatchEvent(Event evt) native "IDBDatabase_dispatchEvent_Callback"
; |
| 164 | 164 |
| 165 | 165 |
| 166 /** @domName IDBDatabase.removeEventListener */ | 166 /** @domName IDBDatabase.removeEventListener */ |
| 167 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native "IDBDatabase_removeEventListener_Callback"; | 167 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native "IDBDatabase_removeEventListener_Callback"; |
| 168 | 168 |
| 169 Transaction transaction(storeName_OR_storeNames, /*DOMString*/ mode) { | 169 Transaction transaction(storeName_OR_storeNames, String mode) { |
| 170 if ((storeName_OR_storeNames is List<String> || storeName_OR_storeNames == n
ull) && (mode is String || mode == null)) { | 170 if ((storeName_OR_storeNames is List<String> || storeName_OR_storeNames == n
ull) && (mode is String || mode == null)) { |
| 171 return _transaction_1(storeName_OR_storeNames, mode); | 171 return _transaction_1(storeName_OR_storeNames, mode); |
| 172 } | 172 } |
| 173 if ((storeName_OR_storeNames is List<String> || storeName_OR_storeNames == n
ull) && (mode is String || mode == null)) { | 173 if ((storeName_OR_storeNames is List<String> || storeName_OR_storeNames == n
ull) && (mode is String || mode == null)) { |
| 174 return _transaction_2(storeName_OR_storeNames, mode); | 174 return _transaction_2(storeName_OR_storeNames, mode); |
| 175 } | 175 } |
| 176 if ((storeName_OR_storeNames is String || storeName_OR_storeNames == null) &
& (mode is String || mode == null)) { | 176 if ((storeName_OR_storeNames is String || storeName_OR_storeNames == null) &
& (mode is String || mode == null)) { |
| 177 return _transaction_3(storeName_OR_storeNames, mode); | 177 return _transaction_3(storeName_OR_storeNames, mode); |
| 178 } | 178 } |
| 179 throw new ArgumentError("Incorrect number or type of arguments"); | 179 throw new ArgumentError("Incorrect number or type of arguments"); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 IdbFactory.internal(); | 234 IdbFactory.internal(); |
| 235 | 235 |
| 236 | 236 |
| 237 /** @domName IDBFactory.cmp */ | 237 /** @domName IDBFactory.cmp */ |
| 238 int cmp(/*IDBKey*/ first, /*IDBKey*/ second) native "IDBFactory_cmp_Callback"; | 238 int cmp(/*IDBKey*/ first, /*IDBKey*/ second) native "IDBFactory_cmp_Callback"; |
| 239 | 239 |
| 240 | 240 |
| 241 /** @domName IDBFactory.deleteDatabase */ | 241 /** @domName IDBFactory.deleteDatabase */ |
| 242 VersionChangeRequest deleteDatabase(String name) native "IDBFactory_deleteData
base_Callback"; | 242 VersionChangeRequest deleteDatabase(String name) native "IDBFactory_deleteData
base_Callback"; |
| 243 | 243 |
| 244 OpenDBRequest open(/*DOMString*/ name, [/*long long*/ version]) { | 244 OpenDBRequest open(String name, [int version]) { |
| 245 if (?version) { | 245 if (?version) { |
| 246 return _open_1(name, version); | 246 return _open_1(name, version); |
| 247 } | 247 } |
| 248 return _open_2(name); | 248 return _open_2(name); |
| 249 } | 249 } |
| 250 | 250 |
| 251 | 251 |
| 252 /** @domName IDBFactory.open_1 */ | 252 /** @domName IDBFactory.open_1 */ |
| 253 OpenDBRequest _open_1(name, version) native "IDBFactory_open_1_Callback"; | 253 OpenDBRequest _open_1(name, version) native "IDBFactory_open_1_Callback"; |
| 254 | 254 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 } | 346 } |
| 347 | 347 |
| 348 | 348 |
| 349 /** @domName IDBIndex.getKey_1 */ | 349 /** @domName IDBIndex.getKey_1 */ |
| 350 Request _getKey_1(key) native "IDBIndex_getKey_1_Callback"; | 350 Request _getKey_1(key) native "IDBIndex_getKey_1_Callback"; |
| 351 | 351 |
| 352 | 352 |
| 353 /** @domName IDBIndex.getKey_2 */ | 353 /** @domName IDBIndex.getKey_2 */ |
| 354 Request _getKey_2(key) native "IDBIndex_getKey_2_Callback"; | 354 Request _getKey_2(key) native "IDBIndex_getKey_2_Callback"; |
| 355 | 355 |
| 356 Request openCursor([key_OR_range, /*DOMString*/ direction]) { | 356 Request openCursor([key_OR_range, String direction]) { |
| 357 if (!?key_OR_range && !?direction) { | 357 if (!?key_OR_range && !?direction) { |
| 358 return _openCursor_1(); | 358 return _openCursor_1(); |
| 359 } | 359 } |
| 360 if ((key_OR_range is KeyRange || key_OR_range == null) && !?direction) { | 360 if ((key_OR_range is KeyRange || key_OR_range == null) && !?direction) { |
| 361 return _openCursor_2(key_OR_range); | 361 return _openCursor_2(key_OR_range); |
| 362 } | 362 } |
| 363 if ((key_OR_range is KeyRange || key_OR_range == null) && (direction is Stri
ng || direction == null)) { | 363 if ((key_OR_range is KeyRange || key_OR_range == null) && (direction is Stri
ng || direction == null)) { |
| 364 return _openCursor_3(key_OR_range, direction); | 364 return _openCursor_3(key_OR_range, direction); |
| 365 } | 365 } |
| 366 if (?key_OR_range && !?direction) { | 366 if (?key_OR_range && !?direction) { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 385 Request _openCursor_3(key_OR_range, direction) native "IDBIndex_openCursor_3_C
allback"; | 385 Request _openCursor_3(key_OR_range, direction) native "IDBIndex_openCursor_3_C
allback"; |
| 386 | 386 |
| 387 | 387 |
| 388 /** @domName IDBIndex.openCursor_4 */ | 388 /** @domName IDBIndex.openCursor_4 */ |
| 389 Request _openCursor_4(key_OR_range) native "IDBIndex_openCursor_4_Callback"; | 389 Request _openCursor_4(key_OR_range) native "IDBIndex_openCursor_4_Callback"; |
| 390 | 390 |
| 391 | 391 |
| 392 /** @domName IDBIndex.openCursor_5 */ | 392 /** @domName IDBIndex.openCursor_5 */ |
| 393 Request _openCursor_5(key_OR_range, direction) native "IDBIndex_openCursor_5_C
allback"; | 393 Request _openCursor_5(key_OR_range, direction) native "IDBIndex_openCursor_5_C
allback"; |
| 394 | 394 |
| 395 Request openKeyCursor([key_OR_range, /*DOMString*/ direction]) { | 395 Request openKeyCursor([key_OR_range, String direction]) { |
| 396 if (!?key_OR_range && !?direction) { | 396 if (!?key_OR_range && !?direction) { |
| 397 return _openKeyCursor_1(); | 397 return _openKeyCursor_1(); |
| 398 } | 398 } |
| 399 if ((key_OR_range is KeyRange || key_OR_range == null) && !?direction) { | 399 if ((key_OR_range is KeyRange || key_OR_range == null) && !?direction) { |
| 400 return _openKeyCursor_2(key_OR_range); | 400 return _openKeyCursor_2(key_OR_range); |
| 401 } | 401 } |
| 402 if ((key_OR_range is KeyRange || key_OR_range == null) && (direction is Stri
ng || direction == null)) { | 402 if ((key_OR_range is KeyRange || key_OR_range == null) && (direction is Stri
ng || direction == null)) { |
| 403 return _openKeyCursor_3(key_OR_range, direction); | 403 return _openKeyCursor_3(key_OR_range, direction); |
| 404 } | 404 } |
| 405 if (?key_OR_range && !?direction) { | 405 if (?key_OR_range && !?direction) { |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 bool get lowerOpen native "IDBKeyRange_lowerOpen_Getter"; | 488 bool get lowerOpen native "IDBKeyRange_lowerOpen_Getter"; |
| 489 | 489 |
| 490 | 490 |
| 491 /** @domName IDBKeyRange.upper */ | 491 /** @domName IDBKeyRange.upper */ |
| 492 dynamic get upper native "IDBKeyRange_upper_Getter"; | 492 dynamic get upper native "IDBKeyRange_upper_Getter"; |
| 493 | 493 |
| 494 | 494 |
| 495 /** @domName IDBKeyRange.upperOpen */ | 495 /** @domName IDBKeyRange.upperOpen */ |
| 496 bool get upperOpen native "IDBKeyRange_upperOpen_Getter"; | 496 bool get upperOpen native "IDBKeyRange_upperOpen_Getter"; |
| 497 | 497 |
| 498 static KeyRange bound_(/*IDBKey*/ lower, /*IDBKey*/ upper, [/*boolean*/ lowerO
pen, /*boolean*/ upperOpen]) { | 498 static KeyRange bound_(/*IDBKey*/ lower, /*IDBKey*/ upper, [bool lowerOpen, bo
ol upperOpen]) { |
| 499 if (?upperOpen) { | 499 if (?upperOpen) { |
| 500 return _bound_1(lower, upper, lowerOpen, upperOpen); | 500 return _bound_1(lower, upper, lowerOpen, upperOpen); |
| 501 } | 501 } |
| 502 if (?lowerOpen) { | 502 if (?lowerOpen) { |
| 503 return _bound_2(lower, upper, lowerOpen); | 503 return _bound_2(lower, upper, lowerOpen); |
| 504 } | 504 } |
| 505 return _bound_3(lower, upper); | 505 return _bound_3(lower, upper); |
| 506 } | 506 } |
| 507 | 507 |
| 508 | 508 |
| 509 /** @domName IDBKeyRange.bound_1 */ | 509 /** @domName IDBKeyRange.bound_1 */ |
| 510 static KeyRange _bound_1(lower, upper, lowerOpen, upperOpen) native "IDBKeyRan
ge_bound_1_Callback"; | 510 static KeyRange _bound_1(lower, upper, lowerOpen, upperOpen) native "IDBKeyRan
ge_bound_1_Callback"; |
| 511 | 511 |
| 512 | 512 |
| 513 /** @domName IDBKeyRange.bound_2 */ | 513 /** @domName IDBKeyRange.bound_2 */ |
| 514 static KeyRange _bound_2(lower, upper, lowerOpen) native "IDBKeyRange_bound_2_
Callback"; | 514 static KeyRange _bound_2(lower, upper, lowerOpen) native "IDBKeyRange_bound_2_
Callback"; |
| 515 | 515 |
| 516 | 516 |
| 517 /** @domName IDBKeyRange.bound_3 */ | 517 /** @domName IDBKeyRange.bound_3 */ |
| 518 static KeyRange _bound_3(lower, upper) native "IDBKeyRange_bound_3_Callback"; | 518 static KeyRange _bound_3(lower, upper) native "IDBKeyRange_bound_3_Callback"; |
| 519 | 519 |
| 520 static KeyRange lowerBound_(/*IDBKey*/ bound, [/*boolean*/ open]) { | 520 static KeyRange lowerBound_(/*IDBKey*/ bound, [bool open]) { |
| 521 if (?open) { | 521 if (?open) { |
| 522 return _lowerBound_1(bound, open); | 522 return _lowerBound_1(bound, open); |
| 523 } | 523 } |
| 524 return _lowerBound_2(bound); | 524 return _lowerBound_2(bound); |
| 525 } | 525 } |
| 526 | 526 |
| 527 | 527 |
| 528 /** @domName IDBKeyRange.lowerBound_1 */ | 528 /** @domName IDBKeyRange.lowerBound_1 */ |
| 529 static KeyRange _lowerBound_1(bound, open) native "IDBKeyRange_lowerBound_1_Ca
llback"; | 529 static KeyRange _lowerBound_1(bound, open) native "IDBKeyRange_lowerBound_1_Ca
llback"; |
| 530 | 530 |
| 531 | 531 |
| 532 /** @domName IDBKeyRange.lowerBound_2 */ | 532 /** @domName IDBKeyRange.lowerBound_2 */ |
| 533 static KeyRange _lowerBound_2(bound) native "IDBKeyRange_lowerBound_2_Callback
"; | 533 static KeyRange _lowerBound_2(bound) native "IDBKeyRange_lowerBound_2_Callback
"; |
| 534 | 534 |
| 535 | 535 |
| 536 /** @domName IDBKeyRange.only_ */ | 536 /** @domName IDBKeyRange.only_ */ |
| 537 static KeyRange only_(/*IDBKey*/ value) native "IDBKeyRange_only__Callback"; | 537 static KeyRange only_(/*IDBKey*/ value) native "IDBKeyRange_only__Callback"; |
| 538 | 538 |
| 539 static KeyRange upperBound_(/*IDBKey*/ bound, [/*boolean*/ open]) { | 539 static KeyRange upperBound_(/*IDBKey*/ bound, [bool open]) { |
| 540 if (?open) { | 540 if (?open) { |
| 541 return _upperBound_1(bound, open); | 541 return _upperBound_1(bound, open); |
| 542 } | 542 } |
| 543 return _upperBound_2(bound); | 543 return _upperBound_2(bound); |
| 544 } | 544 } |
| 545 | 545 |
| 546 | 546 |
| 547 /** @domName IDBKeyRange.upperBound_1 */ | 547 /** @domName IDBKeyRange.upperBound_1 */ |
| 548 static KeyRange _upperBound_1(bound, open) native "IDBKeyRange_upperBound_1_Ca
llback"; | 548 static KeyRange _upperBound_1(bound, open) native "IDBKeyRange_upperBound_1_Ca
llback"; |
| 549 | 549 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 576 dynamic get keyPath native "IDBObjectStore_keyPath_Getter"; | 576 dynamic get keyPath native "IDBObjectStore_keyPath_Getter"; |
| 577 | 577 |
| 578 | 578 |
| 579 /** @domName IDBObjectStore.name */ | 579 /** @domName IDBObjectStore.name */ |
| 580 String get name native "IDBObjectStore_name_Getter"; | 580 String get name native "IDBObjectStore_name_Getter"; |
| 581 | 581 |
| 582 | 582 |
| 583 /** @domName IDBObjectStore.transaction */ | 583 /** @domName IDBObjectStore.transaction */ |
| 584 Transaction get transaction native "IDBObjectStore_transaction_Getter"; | 584 Transaction get transaction native "IDBObjectStore_transaction_Getter"; |
| 585 | 585 |
| 586 Request add(/*any*/ value, [/*IDBKey*/ key]) { | 586 Request add(Object value, [/*IDBKey*/ key]) { |
| 587 if (?key) { | 587 if (?key) { |
| 588 return _add_1(value, key); | 588 return _add_1(value, key); |
| 589 } | 589 } |
| 590 return _add_2(value); | 590 return _add_2(value); |
| 591 } | 591 } |
| 592 | 592 |
| 593 | 593 |
| 594 /** @domName IDBObjectStore.add_1 */ | 594 /** @domName IDBObjectStore.add_1 */ |
| 595 Request _add_1(value, key) native "IDBObjectStore_add_1_Callback"; | 595 Request _add_1(value, key) native "IDBObjectStore_add_1_Callback"; |
| 596 | 596 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 620 Request _count_1() native "IDBObjectStore_count_1_Callback"; | 620 Request _count_1() native "IDBObjectStore_count_1_Callback"; |
| 621 | 621 |
| 622 | 622 |
| 623 /** @domName IDBObjectStore.count_2 */ | 623 /** @domName IDBObjectStore.count_2 */ |
| 624 Request _count_2(key_OR_range) native "IDBObjectStore_count_2_Callback"; | 624 Request _count_2(key_OR_range) native "IDBObjectStore_count_2_Callback"; |
| 625 | 625 |
| 626 | 626 |
| 627 /** @domName IDBObjectStore.count_3 */ | 627 /** @domName IDBObjectStore.count_3 */ |
| 628 Request _count_3(key_OR_range) native "IDBObjectStore_count_3_Callback"; | 628 Request _count_3(key_OR_range) native "IDBObjectStore_count_3_Callback"; |
| 629 | 629 |
| 630 Index createIndex(/*DOMString*/ name, keyPath, [/*Dictionary*/ options]) { | 630 Index createIndex(String name, keyPath, [Map options]) { |
| 631 if ((name is String || name == null) && (keyPath is List<String> || keyPath
== null) && (options is Map || options == null)) { | 631 if ((name is String || name == null) && (keyPath is List<String> || keyPath
== null) && (options is Map || options == null)) { |
| 632 return _createIndex_1(name, keyPath, options); | 632 return _createIndex_1(name, keyPath, options); |
| 633 } | 633 } |
| 634 if ((name is String || name == null) && (keyPath is String || keyPath == nul
l) && (options is Map || options == null)) { | 634 if ((name is String || name == null) && (keyPath is String || keyPath == nul
l) && (options is Map || options == null)) { |
| 635 return _createIndex_2(name, keyPath, options); | 635 return _createIndex_2(name, keyPath, options); |
| 636 } | 636 } |
| 637 throw new ArgumentError("Incorrect number or type of arguments"); | 637 throw new ArgumentError("Incorrect number or type of arguments"); |
| 638 } | 638 } |
| 639 | 639 |
| 640 | 640 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 682 Request _get_1(key) native "IDBObjectStore_get_1_Callback"; | 682 Request _get_1(key) native "IDBObjectStore_get_1_Callback"; |
| 683 | 683 |
| 684 | 684 |
| 685 /** @domName IDBObjectStore.get_2 */ | 685 /** @domName IDBObjectStore.get_2 */ |
| 686 Request _get_2(key) native "IDBObjectStore_get_2_Callback"; | 686 Request _get_2(key) native "IDBObjectStore_get_2_Callback"; |
| 687 | 687 |
| 688 | 688 |
| 689 /** @domName IDBObjectStore.index */ | 689 /** @domName IDBObjectStore.index */ |
| 690 Index index(String name) native "IDBObjectStore_index_Callback"; | 690 Index index(String name) native "IDBObjectStore_index_Callback"; |
| 691 | 691 |
| 692 Request openCursor([key_OR_range, /*DOMString*/ direction]) { | 692 Request openCursor([key_OR_range, String direction]) { |
| 693 if (!?key_OR_range && !?direction) { | 693 if (!?key_OR_range && !?direction) { |
| 694 return _openCursor_1(); | 694 return _openCursor_1(); |
| 695 } | 695 } |
| 696 if ((key_OR_range is KeyRange || key_OR_range == null) && !?direction) { | 696 if ((key_OR_range is KeyRange || key_OR_range == null) && !?direction) { |
| 697 return _openCursor_2(key_OR_range); | 697 return _openCursor_2(key_OR_range); |
| 698 } | 698 } |
| 699 if ((key_OR_range is KeyRange || key_OR_range == null) && (direction is Stri
ng || direction == null)) { | 699 if ((key_OR_range is KeyRange || key_OR_range == null) && (direction is Stri
ng || direction == null)) { |
| 700 return _openCursor_3(key_OR_range, direction); | 700 return _openCursor_3(key_OR_range, direction); |
| 701 } | 701 } |
| 702 if (?key_OR_range && !?direction) { | 702 if (?key_OR_range && !?direction) { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 721 Request _openCursor_3(key_OR_range, direction) native "IDBObjectStore_openCurs
or_3_Callback"; | 721 Request _openCursor_3(key_OR_range, direction) native "IDBObjectStore_openCurs
or_3_Callback"; |
| 722 | 722 |
| 723 | 723 |
| 724 /** @domName IDBObjectStore.openCursor_4 */ | 724 /** @domName IDBObjectStore.openCursor_4 */ |
| 725 Request _openCursor_4(key_OR_range) native "IDBObjectStore_openCursor_4_Callba
ck"; | 725 Request _openCursor_4(key_OR_range) native "IDBObjectStore_openCursor_4_Callba
ck"; |
| 726 | 726 |
| 727 | 727 |
| 728 /** @domName IDBObjectStore.openCursor_5 */ | 728 /** @domName IDBObjectStore.openCursor_5 */ |
| 729 Request _openCursor_5(key_OR_range, direction) native "IDBObjectStore_openCurs
or_5_Callback"; | 729 Request _openCursor_5(key_OR_range, direction) native "IDBObjectStore_openCurs
or_5_Callback"; |
| 730 | 730 |
| 731 Request put(/*any*/ value, [/*IDBKey*/ key]) { | 731 Request put(Object value, [/*IDBKey*/ key]) { |
| 732 if (?key) { | 732 if (?key) { |
| 733 return _put_1(value, key); | 733 return _put_1(value, key); |
| 734 } | 734 } |
| 735 return _put_2(value); | 735 return _put_2(value); |
| 736 } | 736 } |
| 737 | 737 |
| 738 | 738 |
| 739 /** @domName IDBObjectStore.put_1 */ | 739 /** @domName IDBObjectStore.put_1 */ |
| 740 Request _put_1(value, key) native "IDBObjectStore_put_1_Callback"; | 740 Request _put_1(value, key) native "IDBObjectStore_put_1_Callback"; |
| 741 | 741 |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1001 // BSD-style license that can be found in the LICENSE file. | 1001 // BSD-style license that can be found in the LICENSE file. |
| 1002 | 1002 |
| 1003 // WARNING: Do not edit - generated code. | 1003 // WARNING: Do not edit - generated code. |
| 1004 | 1004 |
| 1005 | 1005 |
| 1006 /// @domName IDBAny | 1006 /// @domName IDBAny |
| 1007 class _Any extends NativeFieldWrapperClass1 { | 1007 class _Any extends NativeFieldWrapperClass1 { |
| 1008 _Any.internal(); | 1008 _Any.internal(); |
| 1009 | 1009 |
| 1010 } | 1010 } |
| OLD | NEW |