OLD | NEW |
1 library indexed_db; | 1 library indexed_db; |
2 | 2 |
3 import 'dart:html'; | 3 import 'dart:html'; |
4 import 'dart:html_common'; | 4 import 'dart:html_common'; |
5 import 'dart:nativewrappers'; | 5 import 'dart:nativewrappers'; |
6 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 6 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
7 // for details. All rights reserved. Use of this source code is governed by a | 7 // for details. All rights reserved. Use of this source code is governed by a |
8 // BSD-style license that can be found in the LICENSE file. | 8 // BSD-style license that can be found in the LICENSE file. |
9 | 9 |
10 // DO NOT EDIT | 10 // DO NOT EDIT |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 void deleteObjectStore(String name) native "IDBDatabase_deleteObjectStore_Call
back"; | 148 void deleteObjectStore(String name) native "IDBDatabase_deleteObjectStore_Call
back"; |
149 | 149 |
150 | 150 |
151 /** @domName IDBDatabase.dispatchEvent */ | 151 /** @domName IDBDatabase.dispatchEvent */ |
152 bool $dom_dispatchEvent(Event evt) native "IDBDatabase_dispatchEvent_Callback"
; | 152 bool $dom_dispatchEvent(Event evt) native "IDBDatabase_dispatchEvent_Callback"
; |
153 | 153 |
154 | 154 |
155 /** @domName IDBDatabase.removeEventListener */ | 155 /** @domName IDBDatabase.removeEventListener */ |
156 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native "IDBDatabase_removeEventListener_Callback"; | 156 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native "IDBDatabase_removeEventListener_Callback"; |
157 | 157 |
158 Transaction transaction(storeName_OR_storeNames, /*DOMString*/ mode) { | 158 Transaction transaction(storeName_OR_storeNames, String mode) { |
159 if ((storeName_OR_storeNames is List<String> || storeName_OR_storeNames == n
ull) && (mode is String || mode == null)) { | 159 if ((storeName_OR_storeNames is List<String> || storeName_OR_storeNames == n
ull) && (mode is String || mode == null)) { |
160 return _transaction_1(storeName_OR_storeNames, mode); | 160 return _transaction_1(storeName_OR_storeNames, mode); |
161 } | 161 } |
162 if ((storeName_OR_storeNames is List<String> || storeName_OR_storeNames == n
ull) && (mode is String || mode == null)) { | 162 if ((storeName_OR_storeNames is List<String> || storeName_OR_storeNames == n
ull) && (mode is String || mode == null)) { |
163 return _transaction_2(storeName_OR_storeNames, mode); | 163 return _transaction_2(storeName_OR_storeNames, mode); |
164 } | 164 } |
165 if ((storeName_OR_storeNames is String || storeName_OR_storeNames == null) &
& (mode is String || mode == null)) { | 165 if ((storeName_OR_storeNames is String || storeName_OR_storeNames == null) &
& (mode is String || mode == null)) { |
166 return _transaction_3(storeName_OR_storeNames, mode); | 166 return _transaction_3(storeName_OR_storeNames, mode); |
167 } | 167 } |
168 throw "Incorrect number or type of arguments"; | 168 throw "Incorrect number or type of arguments"; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 IdbFactory.internal(); | 208 IdbFactory.internal(); |
209 | 209 |
210 | 210 |
211 /** @domName IDBFactory.cmp */ | 211 /** @domName IDBFactory.cmp */ |
212 int cmp(/*IDBKey*/ first, /*IDBKey*/ second) native "IDBFactory_cmp_Callback"; | 212 int cmp(/*IDBKey*/ first, /*IDBKey*/ second) native "IDBFactory_cmp_Callback"; |
213 | 213 |
214 | 214 |
215 /** @domName IDBFactory.deleteDatabase */ | 215 /** @domName IDBFactory.deleteDatabase */ |
216 VersionChangeRequest deleteDatabase(String name) native "IDBFactory_deleteData
base_Callback"; | 216 VersionChangeRequest deleteDatabase(String name) native "IDBFactory_deleteData
base_Callback"; |
217 | 217 |
218 OpenDBRequest open(/*DOMString*/ name, [/*long long*/ version]) { | 218 OpenDBRequest open(String name, [int version]) { |
219 if (?version) { | 219 if (?version) { |
220 return _open_1(name, version); | 220 return _open_1(name, version); |
221 } | 221 } |
222 return _open_2(name); | 222 return _open_2(name); |
223 } | 223 } |
224 | 224 |
225 | 225 |
226 /** @domName IDBFactory.open_1 */ | 226 /** @domName IDBFactory.open_1 */ |
227 OpenDBRequest _open_1(name, version) native "IDBFactory_open_1_Callback"; | 227 OpenDBRequest _open_1(name, version) native "IDBFactory_open_1_Callback"; |
228 | 228 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 } | 314 } |
315 | 315 |
316 | 316 |
317 /** @domName IDBIndex.getKey_1 */ | 317 /** @domName IDBIndex.getKey_1 */ |
318 Request _getKey_1(key) native "IDBIndex_getKey_1_Callback"; | 318 Request _getKey_1(key) native "IDBIndex_getKey_1_Callback"; |
319 | 319 |
320 | 320 |
321 /** @domName IDBIndex.getKey_2 */ | 321 /** @domName IDBIndex.getKey_2 */ |
322 Request _getKey_2(key) native "IDBIndex_getKey_2_Callback"; | 322 Request _getKey_2(key) native "IDBIndex_getKey_2_Callback"; |
323 | 323 |
324 Request openCursor([key_OR_range, /*DOMString*/ direction]) { | 324 Request openCursor([key_OR_range, String direction]) { |
325 if (!?key_OR_range && !?direction) { | 325 if (!?key_OR_range && !?direction) { |
326 return _openCursor_1(); | 326 return _openCursor_1(); |
327 } | 327 } |
328 if ((key_OR_range is KeyRange || key_OR_range == null) && !?direction) { | 328 if ((key_OR_range is KeyRange || key_OR_range == null) && !?direction) { |
329 return _openCursor_2(key_OR_range); | 329 return _openCursor_2(key_OR_range); |
330 } | 330 } |
331 if ((key_OR_range is KeyRange || key_OR_range == null) && (direction is Stri
ng || direction == null)) { | 331 if ((key_OR_range is KeyRange || key_OR_range == null) && (direction is Stri
ng || direction == null)) { |
332 return _openCursor_3(key_OR_range, direction); | 332 return _openCursor_3(key_OR_range, direction); |
333 } | 333 } |
334 if (!?direction) { | 334 if (!?direction) { |
(...skipping 18 matching lines...) Expand all Loading... |
353 Request _openCursor_3(key_OR_range, direction) native "IDBIndex_openCursor_3_C
allback"; | 353 Request _openCursor_3(key_OR_range, direction) native "IDBIndex_openCursor_3_C
allback"; |
354 | 354 |
355 | 355 |
356 /** @domName IDBIndex.openCursor_4 */ | 356 /** @domName IDBIndex.openCursor_4 */ |
357 Request _openCursor_4(key_OR_range) native "IDBIndex_openCursor_4_Callback"; | 357 Request _openCursor_4(key_OR_range) native "IDBIndex_openCursor_4_Callback"; |
358 | 358 |
359 | 359 |
360 /** @domName IDBIndex.openCursor_5 */ | 360 /** @domName IDBIndex.openCursor_5 */ |
361 Request _openCursor_5(key_OR_range, direction) native "IDBIndex_openCursor_5_C
allback"; | 361 Request _openCursor_5(key_OR_range, direction) native "IDBIndex_openCursor_5_C
allback"; |
362 | 362 |
363 Request openKeyCursor([key_OR_range, /*DOMString*/ direction]) { | 363 Request openKeyCursor([key_OR_range, String direction]) { |
364 if (!?key_OR_range && !?direction) { | 364 if (!?key_OR_range && !?direction) { |
365 return _openKeyCursor_1(); | 365 return _openKeyCursor_1(); |
366 } | 366 } |
367 if ((key_OR_range is KeyRange || key_OR_range == null) && !?direction) { | 367 if ((key_OR_range is KeyRange || key_OR_range == null) && !?direction) { |
368 return _openKeyCursor_2(key_OR_range); | 368 return _openKeyCursor_2(key_OR_range); |
369 } | 369 } |
370 if ((key_OR_range is KeyRange || key_OR_range == null) && (direction is Stri
ng || direction == null)) { | 370 if ((key_OR_range is KeyRange || key_OR_range == null) && (direction is Stri
ng || direction == null)) { |
371 return _openKeyCursor_3(key_OR_range, direction); | 371 return _openKeyCursor_3(key_OR_range, direction); |
372 } | 372 } |
373 if (!?direction) { | 373 if (!?direction) { |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 bool get lowerOpen native "IDBKeyRange_lowerOpen_Getter"; | 456 bool get lowerOpen native "IDBKeyRange_lowerOpen_Getter"; |
457 | 457 |
458 | 458 |
459 /** @domName IDBKeyRange.upper */ | 459 /** @domName IDBKeyRange.upper */ |
460 dynamic get upper native "IDBKeyRange_upper_Getter"; | 460 dynamic get upper native "IDBKeyRange_upper_Getter"; |
461 | 461 |
462 | 462 |
463 /** @domName IDBKeyRange.upperOpen */ | 463 /** @domName IDBKeyRange.upperOpen */ |
464 bool get upperOpen native "IDBKeyRange_upperOpen_Getter"; | 464 bool get upperOpen native "IDBKeyRange_upperOpen_Getter"; |
465 | 465 |
466 static KeyRange bound_(/*IDBKey*/ lower, /*IDBKey*/ upper, [/*boolean*/ lowerO
pen, /*boolean*/ upperOpen]) { | 466 static KeyRange bound_(/*IDBKey*/ lower, /*IDBKey*/ upper, [bool lowerOpen, bo
ol upperOpen]) { |
467 if (?upperOpen) { | 467 if (?upperOpen) { |
468 return _bound_1(lower, upper, lowerOpen, upperOpen); | 468 return _bound_1(lower, upper, lowerOpen, upperOpen); |
469 } | 469 } |
470 if (?lowerOpen) { | 470 if (?lowerOpen) { |
471 return _bound_2(lower, upper, lowerOpen); | 471 return _bound_2(lower, upper, lowerOpen); |
472 } | 472 } |
473 return _bound_3(lower, upper); | 473 return _bound_3(lower, upper); |
474 } | 474 } |
475 | 475 |
476 | 476 |
477 /** @domName IDBKeyRange.bound_1 */ | 477 /** @domName IDBKeyRange.bound_1 */ |
478 static KeyRange _bound_1(lower, upper, lowerOpen, upperOpen) native "IDBKeyRan
ge_bound_1_Callback"; | 478 static KeyRange _bound_1(lower, upper, lowerOpen, upperOpen) native "IDBKeyRan
ge_bound_1_Callback"; |
479 | 479 |
480 | 480 |
481 /** @domName IDBKeyRange.bound_2 */ | 481 /** @domName IDBKeyRange.bound_2 */ |
482 static KeyRange _bound_2(lower, upper, lowerOpen) native "IDBKeyRange_bound_2_
Callback"; | 482 static KeyRange _bound_2(lower, upper, lowerOpen) native "IDBKeyRange_bound_2_
Callback"; |
483 | 483 |
484 | 484 |
485 /** @domName IDBKeyRange.bound_3 */ | 485 /** @domName IDBKeyRange.bound_3 */ |
486 static KeyRange _bound_3(lower, upper) native "IDBKeyRange_bound_3_Callback"; | 486 static KeyRange _bound_3(lower, upper) native "IDBKeyRange_bound_3_Callback"; |
487 | 487 |
488 static KeyRange lowerBound_(/*IDBKey*/ bound, [/*boolean*/ open]) { | 488 static KeyRange lowerBound_(/*IDBKey*/ bound, [bool open]) { |
489 if (?open) { | 489 if (?open) { |
490 return _lowerBound_1(bound, open); | 490 return _lowerBound_1(bound, open); |
491 } | 491 } |
492 return _lowerBound_2(bound); | 492 return _lowerBound_2(bound); |
493 } | 493 } |
494 | 494 |
495 | 495 |
496 /** @domName IDBKeyRange.lowerBound_1 */ | 496 /** @domName IDBKeyRange.lowerBound_1 */ |
497 static KeyRange _lowerBound_1(bound, open) native "IDBKeyRange_lowerBound_1_Ca
llback"; | 497 static KeyRange _lowerBound_1(bound, open) native "IDBKeyRange_lowerBound_1_Ca
llback"; |
498 | 498 |
499 | 499 |
500 /** @domName IDBKeyRange.lowerBound_2 */ | 500 /** @domName IDBKeyRange.lowerBound_2 */ |
501 static KeyRange _lowerBound_2(bound) native "IDBKeyRange_lowerBound_2_Callback
"; | 501 static KeyRange _lowerBound_2(bound) native "IDBKeyRange_lowerBound_2_Callback
"; |
502 | 502 |
503 | 503 |
504 /** @domName IDBKeyRange.only_ */ | 504 /** @domName IDBKeyRange.only_ */ |
505 static KeyRange only_(/*IDBKey*/ value) native "IDBKeyRange_only__Callback"; | 505 static KeyRange only_(/*IDBKey*/ value) native "IDBKeyRange_only__Callback"; |
506 | 506 |
507 static KeyRange upperBound_(/*IDBKey*/ bound, [/*boolean*/ open]) { | 507 static KeyRange upperBound_(/*IDBKey*/ bound, [bool open]) { |
508 if (?open) { | 508 if (?open) { |
509 return _upperBound_1(bound, open); | 509 return _upperBound_1(bound, open); |
510 } | 510 } |
511 return _upperBound_2(bound); | 511 return _upperBound_2(bound); |
512 } | 512 } |
513 | 513 |
514 | 514 |
515 /** @domName IDBKeyRange.upperBound_1 */ | 515 /** @domName IDBKeyRange.upperBound_1 */ |
516 static KeyRange _upperBound_1(bound, open) native "IDBKeyRange_upperBound_1_Ca
llback"; | 516 static KeyRange _upperBound_1(bound, open) native "IDBKeyRange_upperBound_1_Ca
llback"; |
517 | 517 |
(...skipping 26 matching lines...) Expand all Loading... |
544 dynamic get keyPath native "IDBObjectStore_keyPath_Getter"; | 544 dynamic get keyPath native "IDBObjectStore_keyPath_Getter"; |
545 | 545 |
546 | 546 |
547 /** @domName IDBObjectStore.name */ | 547 /** @domName IDBObjectStore.name */ |
548 String get name native "IDBObjectStore_name_Getter"; | 548 String get name native "IDBObjectStore_name_Getter"; |
549 | 549 |
550 | 550 |
551 /** @domName IDBObjectStore.transaction */ | 551 /** @domName IDBObjectStore.transaction */ |
552 Transaction get transaction native "IDBObjectStore_transaction_Getter"; | 552 Transaction get transaction native "IDBObjectStore_transaction_Getter"; |
553 | 553 |
554 Request add(/*any*/ value, [/*IDBKey*/ key]) { | 554 Request add(Object value, [/*IDBKey*/ key]) { |
555 if (?key) { | 555 if (?key) { |
556 return _add_1(value, key); | 556 return _add_1(value, key); |
557 } | 557 } |
558 return _add_2(value); | 558 return _add_2(value); |
559 } | 559 } |
560 | 560 |
561 | 561 |
562 /** @domName IDBObjectStore.add_1 */ | 562 /** @domName IDBObjectStore.add_1 */ |
563 Request _add_1(value, key) native "IDBObjectStore_add_1_Callback"; | 563 Request _add_1(value, key) native "IDBObjectStore_add_1_Callback"; |
564 | 564 |
(...skipping 21 matching lines...) Expand all Loading... |
586 Request _count_1() native "IDBObjectStore_count_1_Callback"; | 586 Request _count_1() native "IDBObjectStore_count_1_Callback"; |
587 | 587 |
588 | 588 |
589 /** @domName IDBObjectStore.count_2 */ | 589 /** @domName IDBObjectStore.count_2 */ |
590 Request _count_2(key_OR_range) native "IDBObjectStore_count_2_Callback"; | 590 Request _count_2(key_OR_range) native "IDBObjectStore_count_2_Callback"; |
591 | 591 |
592 | 592 |
593 /** @domName IDBObjectStore.count_3 */ | 593 /** @domName IDBObjectStore.count_3 */ |
594 Request _count_3(key_OR_range) native "IDBObjectStore_count_3_Callback"; | 594 Request _count_3(key_OR_range) native "IDBObjectStore_count_3_Callback"; |
595 | 595 |
596 Index createIndex(/*DOMString*/ name, keyPath, [/*Dictionary*/ options]) { | 596 Index createIndex(String name, keyPath, [Map options]) { |
597 if ((name is String || name == null) && (keyPath is List<String> || keyPath
== null) && (options is Map || options == null)) { | 597 if ((name is String || name == null) && (keyPath is List<String> || keyPath
== null) && (options is Map || options == null)) { |
598 return _createIndex_1(name, keyPath, options); | 598 return _createIndex_1(name, keyPath, options); |
599 } | 599 } |
600 if ((name is String || name == null) && (keyPath is String || keyPath == nul
l) && (options is Map || options == null)) { | 600 if ((name is String || name == null) && (keyPath is String || keyPath == nul
l) && (options is Map || options == null)) { |
601 return _createIndex_2(name, keyPath, options); | 601 return _createIndex_2(name, keyPath, options); |
602 } | 602 } |
603 throw "Incorrect number or type of arguments"; | 603 throw "Incorrect number or type of arguments"; |
604 } | 604 } |
605 | 605 |
606 | 606 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
644 Request _get_1(key) native "IDBObjectStore_get_1_Callback"; | 644 Request _get_1(key) native "IDBObjectStore_get_1_Callback"; |
645 | 645 |
646 | 646 |
647 /** @domName IDBObjectStore.get_2 */ | 647 /** @domName IDBObjectStore.get_2 */ |
648 Request _get_2(key) native "IDBObjectStore_get_2_Callback"; | 648 Request _get_2(key) native "IDBObjectStore_get_2_Callback"; |
649 | 649 |
650 | 650 |
651 /** @domName IDBObjectStore.index */ | 651 /** @domName IDBObjectStore.index */ |
652 Index index(String name) native "IDBObjectStore_index_Callback"; | 652 Index index(String name) native "IDBObjectStore_index_Callback"; |
653 | 653 |
654 Request openCursor([key_OR_range, /*DOMString*/ direction]) { | 654 Request openCursor([key_OR_range, String direction]) { |
655 if (!?key_OR_range && !?direction) { | 655 if (!?key_OR_range && !?direction) { |
656 return _openCursor_1(); | 656 return _openCursor_1(); |
657 } | 657 } |
658 if ((key_OR_range is KeyRange || key_OR_range == null) && !?direction) { | 658 if ((key_OR_range is KeyRange || key_OR_range == null) && !?direction) { |
659 return _openCursor_2(key_OR_range); | 659 return _openCursor_2(key_OR_range); |
660 } | 660 } |
661 if ((key_OR_range is KeyRange || key_OR_range == null) && (direction is Stri
ng || direction == null)) { | 661 if ((key_OR_range is KeyRange || key_OR_range == null) && (direction is Stri
ng || direction == null)) { |
662 return _openCursor_3(key_OR_range, direction); | 662 return _openCursor_3(key_OR_range, direction); |
663 } | 663 } |
664 if (!?direction) { | 664 if (!?direction) { |
(...skipping 18 matching lines...) Expand all Loading... |
683 Request _openCursor_3(key_OR_range, direction) native "IDBObjectStore_openCurs
or_3_Callback"; | 683 Request _openCursor_3(key_OR_range, direction) native "IDBObjectStore_openCurs
or_3_Callback"; |
684 | 684 |
685 | 685 |
686 /** @domName IDBObjectStore.openCursor_4 */ | 686 /** @domName IDBObjectStore.openCursor_4 */ |
687 Request _openCursor_4(key_OR_range) native "IDBObjectStore_openCursor_4_Callba
ck"; | 687 Request _openCursor_4(key_OR_range) native "IDBObjectStore_openCursor_4_Callba
ck"; |
688 | 688 |
689 | 689 |
690 /** @domName IDBObjectStore.openCursor_5 */ | 690 /** @domName IDBObjectStore.openCursor_5 */ |
691 Request _openCursor_5(key_OR_range, direction) native "IDBObjectStore_openCurs
or_5_Callback"; | 691 Request _openCursor_5(key_OR_range, direction) native "IDBObjectStore_openCurs
or_5_Callback"; |
692 | 692 |
693 Request put(/*any*/ value, [/*IDBKey*/ key]) { | 693 Request put(Object value, [/*IDBKey*/ key]) { |
694 if (?key) { | 694 if (?key) { |
695 return _put_1(value, key); | 695 return _put_1(value, key); |
696 } | 696 } |
697 return _put_2(value); | 697 return _put_2(value); |
698 } | 698 } |
699 | 699 |
700 | 700 |
701 /** @domName IDBObjectStore.put_1 */ | 701 /** @domName IDBObjectStore.put_1 */ |
702 Request _put_1(value, key) native "IDBObjectStore_put_1_Callback"; | 702 Request _put_1(value, key) native "IDBObjectStore_put_1_Callback"; |
703 | 703 |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
931 // BSD-style license that can be found in the LICENSE file. | 931 // BSD-style license that can be found in the LICENSE file. |
932 | 932 |
933 // WARNING: Do not edit - generated code. | 933 // WARNING: Do not edit - generated code. |
934 | 934 |
935 | 935 |
936 /// @domName IDBAny | 936 /// @domName IDBAny |
937 class _Any extends NativeFieldWrapperClass1 { | 937 class _Any extends NativeFieldWrapperClass1 { |
938 _Any.internal(); | 938 _Any.internal(); |
939 | 939 |
940 } | 940 } |
OLD | NEW |