| 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 // 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 dynamic get source native "IDBCursor_source_Getter"; | 77 dynamic get source native "IDBCursor_source_Getter"; |
| 78 | 78 |
| 79 @DomName('IDBCursor.advance') | 79 @DomName('IDBCursor.advance') |
| 80 @DocsEditable | 80 @DocsEditable |
| 81 void advance(int count) native "IDBCursor_advance_Callback"; | 81 void advance(int count) native "IDBCursor_advance_Callback"; |
| 82 | 82 |
| 83 @DomName('IDBCursor.delete') | 83 @DomName('IDBCursor.delete') |
| 84 @DocsEditable | 84 @DocsEditable |
| 85 Request $dom_delete() native "IDBCursor_delete_Callback"; | 85 Request $dom_delete() native "IDBCursor_delete_Callback"; |
| 86 | 86 |
| 87 void next([Object key]) { | 87 @DomName('IDBCursor.next') |
| 88 if (?key) { | |
| 89 _continue_1(key); | |
| 90 return; | |
| 91 } | |
| 92 _continue_2(); | |
| 93 return; | |
| 94 } | |
| 95 | |
| 96 @DomName('IDBCursor._continue_1') | |
| 97 @DocsEditable | 88 @DocsEditable |
| 98 void _continue_1(key) native "IDBCursor__continue_1_Callback"; | 89 void next([Object key]) native "IDBCursor_next_Callback"; |
| 99 | |
| 100 @DomName('IDBCursor._continue_2') | |
| 101 @DocsEditable | |
| 102 void _continue_2() native "IDBCursor__continue_2_Callback"; | |
| 103 | 90 |
| 104 @DomName('IDBCursor.update') | 91 @DomName('IDBCursor.update') |
| 105 @DocsEditable | 92 @DocsEditable |
| 106 Request $dom_update(Object value) native "IDBCursor_update_Callback"; | 93 Request $dom_update(Object value) native "IDBCursor_update_Callback"; |
| 107 | 94 |
| 108 } | 95 } |
| 109 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 96 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 110 // for details. All rights reserved. Use of this source code is governed by a | 97 // for details. All rights reserved. Use of this source code is governed by a |
| 111 // BSD-style license that can be found in the LICENSE file. | 98 // BSD-style license that can be found in the LICENSE file. |
| 112 | 99 |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 484 | 471 |
| 485 @DomName('IDBIndex.objectStore') | 472 @DomName('IDBIndex.objectStore') |
| 486 @DocsEditable | 473 @DocsEditable |
| 487 ObjectStore get objectStore native "IDBIndex_objectStore_Getter"; | 474 ObjectStore get objectStore native "IDBIndex_objectStore_Getter"; |
| 488 | 475 |
| 489 @DomName('IDBIndex.unique') | 476 @DomName('IDBIndex.unique') |
| 490 @DocsEditable | 477 @DocsEditable |
| 491 bool get unique native "IDBIndex_unique_Getter"; | 478 bool get unique native "IDBIndex_unique_Getter"; |
| 492 | 479 |
| 493 Request $dom_count([key_OR_range]) { | 480 Request $dom_count([key_OR_range]) { |
| 494 if (!?key_OR_range) { | |
| 495 return _count_1(); | |
| 496 } | |
| 497 if ((key_OR_range is KeyRange || key_OR_range == null)) { | 481 if ((key_OR_range is KeyRange || key_OR_range == null)) { |
| 498 return _count_2(key_OR_range); | 482 return _count_1(key_OR_range); |
| 499 } | 483 } |
| 500 if (?key_OR_range) { | 484 if (?key_OR_range) { |
| 501 return _count_3(key_OR_range); | 485 return _count_2(key_OR_range); |
| 502 } | 486 } |
| 503 throw new ArgumentError("Incorrect number or type of arguments"); | 487 throw new ArgumentError("Incorrect number or type of arguments"); |
| 504 } | 488 } |
| 505 | 489 |
| 506 @DomName('IDBIndex._count_1') | 490 @DomName('IDBIndex._count_1') |
| 507 @DocsEditable | 491 @DocsEditable |
| 508 Request _count_1() native "IDBIndex__count_1_Callback"; | 492 Request _count_1(key_OR_range) native "IDBIndex__count_1_Callback"; |
| 509 | 493 |
| 510 @DomName('IDBIndex._count_2') | 494 @DomName('IDBIndex._count_2') |
| 511 @DocsEditable | 495 @DocsEditable |
| 512 Request _count_2(key_OR_range) native "IDBIndex__count_2_Callback"; | 496 Request _count_2(key_OR_range) native "IDBIndex__count_2_Callback"; |
| 513 | 497 |
| 514 @DomName('IDBIndex._count_3') | |
| 515 @DocsEditable | |
| 516 Request _count_3(key_OR_range) native "IDBIndex__count_3_Callback"; | |
| 517 | |
| 518 Request $dom_get(key) { | 498 Request $dom_get(key) { |
| 519 if ((key is KeyRange || key == null)) { | 499 if ((key is KeyRange || key == null)) { |
| 520 return _get_1(key); | 500 return _get_1(key); |
| 521 } | 501 } |
| 522 if (?key) { | 502 if (?key) { |
| 523 return _get_2(key); | 503 return _get_2(key); |
| 524 } | 504 } |
| 525 throw new ArgumentError("Incorrect number or type of arguments"); | 505 throw new ArgumentError("Incorrect number or type of arguments"); |
| 526 } | 506 } |
| 527 | 507 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 545 | 525 |
| 546 @DomName('IDBIndex._getKey_1') | 526 @DomName('IDBIndex._getKey_1') |
| 547 @DocsEditable | 527 @DocsEditable |
| 548 Request _getKey_1(key) native "IDBIndex__getKey_1_Callback"; | 528 Request _getKey_1(key) native "IDBIndex__getKey_1_Callback"; |
| 549 | 529 |
| 550 @DomName('IDBIndex._getKey_2') | 530 @DomName('IDBIndex._getKey_2') |
| 551 @DocsEditable | 531 @DocsEditable |
| 552 Request _getKey_2(key) native "IDBIndex__getKey_2_Callback"; | 532 Request _getKey_2(key) native "IDBIndex__getKey_2_Callback"; |
| 553 | 533 |
| 554 Request $dom_openCursor([key_OR_range, String direction]) { | 534 Request $dom_openCursor([key_OR_range, String direction]) { |
| 555 if (!?key_OR_range && !?direction) { | |
| 556 return _openCursor_1(); | |
| 557 } | |
| 558 if ((key_OR_range is KeyRange || key_OR_range == null) && !?direction) { | |
| 559 return _openCursor_2(key_OR_range); | |
| 560 } | |
| 561 if ((key_OR_range is KeyRange || key_OR_range == null) && (direction is Stri
ng || direction == null)) { | 535 if ((key_OR_range is KeyRange || key_OR_range == null) && (direction is Stri
ng || direction == null)) { |
| 562 return _openCursor_3(key_OR_range, direction); | 536 return _openCursor_1(key_OR_range, direction); |
| 563 } | |
| 564 if (?key_OR_range && !?direction) { | |
| 565 return _openCursor_4(key_OR_range); | |
| 566 } | 537 } |
| 567 if (?key_OR_range && (direction is String || direction == null)) { | 538 if (?key_OR_range && (direction is String || direction == null)) { |
| 568 return _openCursor_5(key_OR_range, direction); | 539 return _openCursor_2(key_OR_range, direction); |
| 569 } | 540 } |
| 570 throw new ArgumentError("Incorrect number or type of arguments"); | 541 throw new ArgumentError("Incorrect number or type of arguments"); |
| 571 } | 542 } |
| 572 | 543 |
| 573 @DomName('IDBIndex._openCursor_1') | 544 @DomName('IDBIndex._openCursor_1') |
| 574 @DocsEditable | 545 @DocsEditable |
| 575 Request _openCursor_1() native "IDBIndex__openCursor_1_Callback"; | 546 Request _openCursor_1(key_OR_range, direction) native "IDBIndex__openCursor_1_
Callback"; |
| 576 | 547 |
| 577 @DomName('IDBIndex._openCursor_2') | 548 @DomName('IDBIndex._openCursor_2') |
| 578 @DocsEditable | 549 @DocsEditable |
| 579 Request _openCursor_2(key_OR_range) native "IDBIndex__openCursor_2_Callback"; | 550 Request _openCursor_2(key_OR_range, direction) native "IDBIndex__openCursor_2_
Callback"; |
| 580 | |
| 581 @DomName('IDBIndex._openCursor_3') | |
| 582 @DocsEditable | |
| 583 Request _openCursor_3(key_OR_range, direction) native "IDBIndex__openCursor_3_
Callback"; | |
| 584 | |
| 585 @DomName('IDBIndex._openCursor_4') | |
| 586 @DocsEditable | |
| 587 Request _openCursor_4(key_OR_range) native "IDBIndex__openCursor_4_Callback"; | |
| 588 | |
| 589 @DomName('IDBIndex._openCursor_5') | |
| 590 @DocsEditable | |
| 591 Request _openCursor_5(key_OR_range, direction) native "IDBIndex__openCursor_5_
Callback"; | |
| 592 | 551 |
| 593 Request $dom_openKeyCursor([key_OR_range, String direction]) { | 552 Request $dom_openKeyCursor([key_OR_range, String direction]) { |
| 594 if (!?key_OR_range && !?direction) { | |
| 595 return _openKeyCursor_1(); | |
| 596 } | |
| 597 if ((key_OR_range is KeyRange || key_OR_range == null) && !?direction) { | |
| 598 return _openKeyCursor_2(key_OR_range); | |
| 599 } | |
| 600 if ((key_OR_range is KeyRange || key_OR_range == null) && (direction is Stri
ng || direction == null)) { | 553 if ((key_OR_range is KeyRange || key_OR_range == null) && (direction is Stri
ng || direction == null)) { |
| 601 return _openKeyCursor_3(key_OR_range, direction); | 554 return _openKeyCursor_1(key_OR_range, direction); |
| 602 } | |
| 603 if (?key_OR_range && !?direction) { | |
| 604 return _openKeyCursor_4(key_OR_range); | |
| 605 } | 555 } |
| 606 if (?key_OR_range && (direction is String || direction == null)) { | 556 if (?key_OR_range && (direction is String || direction == null)) { |
| 607 return _openKeyCursor_5(key_OR_range, direction); | 557 return _openKeyCursor_2(key_OR_range, direction); |
| 608 } | 558 } |
| 609 throw new ArgumentError("Incorrect number or type of arguments"); | 559 throw new ArgumentError("Incorrect number or type of arguments"); |
| 610 } | 560 } |
| 611 | 561 |
| 612 @DomName('IDBIndex._openKeyCursor_1') | 562 @DomName('IDBIndex._openKeyCursor_1') |
| 613 @DocsEditable | 563 @DocsEditable |
| 614 Request _openKeyCursor_1() native "IDBIndex__openKeyCursor_1_Callback"; | 564 Request _openKeyCursor_1(key_OR_range, direction) native "IDBIndex__openKeyCur
sor_1_Callback"; |
| 615 | 565 |
| 616 @DomName('IDBIndex._openKeyCursor_2') | 566 @DomName('IDBIndex._openKeyCursor_2') |
| 617 @DocsEditable | 567 @DocsEditable |
| 618 Request _openKeyCursor_2(key_OR_range) native "IDBIndex__openKeyCursor_2_Callb
ack"; | 568 Request _openKeyCursor_2(key_OR_range, direction) native "IDBIndex__openKeyCur
sor_2_Callback"; |
| 619 | |
| 620 @DomName('IDBIndex._openKeyCursor_3') | |
| 621 @DocsEditable | |
| 622 Request _openKeyCursor_3(key_OR_range, direction) native "IDBIndex__openKeyCur
sor_3_Callback"; | |
| 623 | |
| 624 @DomName('IDBIndex._openKeyCursor_4') | |
| 625 @DocsEditable | |
| 626 Request _openKeyCursor_4(key_OR_range) native "IDBIndex__openKeyCursor_4_Callb
ack"; | |
| 627 | |
| 628 @DomName('IDBIndex._openKeyCursor_5') | |
| 629 @DocsEditable | |
| 630 Request _openKeyCursor_5(key_OR_range, direction) native "IDBIndex__openKeyCur
sor_5_Callback"; | |
| 631 | 569 |
| 632 } | 570 } |
| 633 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 571 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 634 // for details. All rights reserved. Use of this source code is governed by a | 572 // for details. All rights reserved. Use of this source code is governed by a |
| 635 // BSD-style license that can be found in the LICENSE file. | 573 // BSD-style license that can be found in the LICENSE file. |
| 636 | 574 |
| 637 | 575 |
| 638 @DomName('IDBKeyRange') | 576 @DomName('IDBKeyRange') |
| 639 class KeyRange extends NativeFieldWrapperClass1 { | 577 class KeyRange extends NativeFieldWrapperClass1 { |
| 640 @DomName('IDBKeyRange.only') | 578 @DomName('IDBKeyRange.only') |
| (...skipping 25 matching lines...) Expand all Loading... |
| 666 bool get lowerOpen native "IDBKeyRange_lowerOpen_Getter"; | 604 bool get lowerOpen native "IDBKeyRange_lowerOpen_Getter"; |
| 667 | 605 |
| 668 @DomName('IDBKeyRange.upper') | 606 @DomName('IDBKeyRange.upper') |
| 669 @DocsEditable | 607 @DocsEditable |
| 670 Object get upper native "IDBKeyRange_upper_Getter"; | 608 Object get upper native "IDBKeyRange_upper_Getter"; |
| 671 | 609 |
| 672 @DomName('IDBKeyRange.upperOpen') | 610 @DomName('IDBKeyRange.upperOpen') |
| 673 @DocsEditable | 611 @DocsEditable |
| 674 bool get upperOpen native "IDBKeyRange_upperOpen_Getter"; | 612 bool get upperOpen native "IDBKeyRange_upperOpen_Getter"; |
| 675 | 613 |
| 676 static KeyRange bound_(Object lower, Object upper, [bool lowerOpen, bool upper
Open]) { | 614 @DomName('IDBKeyRange.bound_') |
| 677 if (?upperOpen) { | 615 @DocsEditable |
| 678 return _bound_1(lower, upper, lowerOpen, upperOpen); | 616 static KeyRange bound_(Object lower, Object upper, [bool lowerOpen, bool upper
Open]) native "IDBKeyRange_bound__Callback"; |
| 679 } | |
| 680 if (?lowerOpen) { | |
| 681 return _bound_2(lower, upper, lowerOpen); | |
| 682 } | |
| 683 return _bound_3(lower, upper); | |
| 684 } | |
| 685 | 617 |
| 686 @DomName('IDBKeyRange._bound_1') | 618 @DomName('IDBKeyRange.lowerBound_') |
| 687 @DocsEditable | 619 @DocsEditable |
| 688 static KeyRange _bound_1(lower, upper, lowerOpen, upperOpen) native "IDBKeyRan
ge__bound_1_Callback"; | 620 static KeyRange lowerBound_(Object bound, [bool open]) native "IDBKeyRange_low
erBound__Callback"; |
| 689 | |
| 690 @DomName('IDBKeyRange._bound_2') | |
| 691 @DocsEditable | |
| 692 static KeyRange _bound_2(lower, upper, lowerOpen) native "IDBKeyRange__bound_2
_Callback"; | |
| 693 | |
| 694 @DomName('IDBKeyRange._bound_3') | |
| 695 @DocsEditable | |
| 696 static KeyRange _bound_3(lower, upper) native "IDBKeyRange__bound_3_Callback"; | |
| 697 | |
| 698 static KeyRange lowerBound_(Object bound, [bool open]) { | |
| 699 if (?open) { | |
| 700 return _lowerBound_1(bound, open); | |
| 701 } | |
| 702 return _lowerBound_2(bound); | |
| 703 } | |
| 704 | |
| 705 @DomName('IDBKeyRange._lowerBound_1') | |
| 706 @DocsEditable | |
| 707 static KeyRange _lowerBound_1(bound, open) native "IDBKeyRange__lowerBound_1_C
allback"; | |
| 708 | |
| 709 @DomName('IDBKeyRange._lowerBound_2') | |
| 710 @DocsEditable | |
| 711 static KeyRange _lowerBound_2(bound) native "IDBKeyRange__lowerBound_2_Callbac
k"; | |
| 712 | 621 |
| 713 @DomName('IDBKeyRange.only_') | 622 @DomName('IDBKeyRange.only_') |
| 714 @DocsEditable | 623 @DocsEditable |
| 715 static KeyRange only_(Object value) native "IDBKeyRange_only__Callback"; | 624 static KeyRange only_(Object value) native "IDBKeyRange_only__Callback"; |
| 716 | 625 |
| 717 static KeyRange upperBound_(Object bound, [bool open]) { | 626 @DomName('IDBKeyRange.upperBound_') |
| 718 if (?open) { | |
| 719 return _upperBound_1(bound, open); | |
| 720 } | |
| 721 return _upperBound_2(bound); | |
| 722 } | |
| 723 | |
| 724 @DomName('IDBKeyRange._upperBound_1') | |
| 725 @DocsEditable | 627 @DocsEditable |
| 726 static KeyRange _upperBound_1(bound, open) native "IDBKeyRange__upperBound_1_C
allback"; | 628 static KeyRange upperBound_(Object bound, [bool open]) native "IDBKeyRange_upp
erBound__Callback"; |
| 727 | |
| 728 @DomName('IDBKeyRange._upperBound_2') | |
| 729 @DocsEditable | |
| 730 static KeyRange _upperBound_2(bound) native "IDBKeyRange__upperBound_2_Callbac
k"; | |
| 731 | 629 |
| 732 } | 630 } |
| 733 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 631 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 734 // for details. All rights reserved. Use of this source code is governed by a | 632 // for details. All rights reserved. Use of this source code is governed by a |
| 735 // BSD-style license that can be found in the LICENSE file. | 633 // BSD-style license that can be found in the LICENSE file. |
| 736 | 634 |
| 737 | 635 |
| 738 @DomName('IDBObjectStore') | 636 @DomName('IDBObjectStore') |
| 739 class ObjectStore extends NativeFieldWrapperClass1 { | 637 class ObjectStore extends NativeFieldWrapperClass1 { |
| 740 | 638 |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 884 dynamic get keyPath native "IDBObjectStore_keyPath_Getter"; | 782 dynamic get keyPath native "IDBObjectStore_keyPath_Getter"; |
| 885 | 783 |
| 886 @DomName('IDBObjectStore.name') | 784 @DomName('IDBObjectStore.name') |
| 887 @DocsEditable | 785 @DocsEditable |
| 888 String get name native "IDBObjectStore_name_Getter"; | 786 String get name native "IDBObjectStore_name_Getter"; |
| 889 | 787 |
| 890 @DomName('IDBObjectStore.transaction') | 788 @DomName('IDBObjectStore.transaction') |
| 891 @DocsEditable | 789 @DocsEditable |
| 892 Transaction get transaction native "IDBObjectStore_transaction_Getter"; | 790 Transaction get transaction native "IDBObjectStore_transaction_Getter"; |
| 893 | 791 |
| 894 Request $dom_add(Object value, [Object key]) { | 792 @DomName('IDBObjectStore.add') |
| 895 if (?key) { | |
| 896 return _add_1(value, key); | |
| 897 } | |
| 898 return _add_2(value); | |
| 899 } | |
| 900 | |
| 901 @DomName('IDBObjectStore._add_1') | |
| 902 @DocsEditable | 793 @DocsEditable |
| 903 Request _add_1(value, key) native "IDBObjectStore__add_1_Callback"; | 794 Request $dom_add(Object value, [Object key]) native "IDBObjectStore_add_Callba
ck"; |
| 904 | |
| 905 @DomName('IDBObjectStore._add_2') | |
| 906 @DocsEditable | |
| 907 Request _add_2(value) native "IDBObjectStore__add_2_Callback"; | |
| 908 | 795 |
| 909 @DomName('IDBObjectStore.clear') | 796 @DomName('IDBObjectStore.clear') |
| 910 @DocsEditable | 797 @DocsEditable |
| 911 Request $dom_clear() native "IDBObjectStore_clear_Callback"; | 798 Request $dom_clear() native "IDBObjectStore_clear_Callback"; |
| 912 | 799 |
| 913 Request $dom_count([key_OR_range]) { | 800 Request $dom_count([key_OR_range]) { |
| 914 if (!?key_OR_range) { | |
| 915 return _count_1(); | |
| 916 } | |
| 917 if ((key_OR_range is KeyRange || key_OR_range == null)) { | 801 if ((key_OR_range is KeyRange || key_OR_range == null)) { |
| 918 return _count_2(key_OR_range); | 802 return _count_1(key_OR_range); |
| 919 } | 803 } |
| 920 if (?key_OR_range) { | 804 if (?key_OR_range) { |
| 921 return _count_3(key_OR_range); | 805 return _count_2(key_OR_range); |
| 922 } | 806 } |
| 923 throw new ArgumentError("Incorrect number or type of arguments"); | 807 throw new ArgumentError("Incorrect number or type of arguments"); |
| 924 } | 808 } |
| 925 | 809 |
| 926 @DomName('IDBObjectStore._count_1') | 810 @DomName('IDBObjectStore._count_1') |
| 927 @DocsEditable | 811 @DocsEditable |
| 928 Request _count_1() native "IDBObjectStore__count_1_Callback"; | 812 Request _count_1(key_OR_range) native "IDBObjectStore__count_1_Callback"; |
| 929 | 813 |
| 930 @DomName('IDBObjectStore._count_2') | 814 @DomName('IDBObjectStore._count_2') |
| 931 @DocsEditable | 815 @DocsEditable |
| 932 Request _count_2(key_OR_range) native "IDBObjectStore__count_2_Callback"; | 816 Request _count_2(key_OR_range) native "IDBObjectStore__count_2_Callback"; |
| 933 | 817 |
| 934 @DomName('IDBObjectStore._count_3') | |
| 935 @DocsEditable | |
| 936 Request _count_3(key_OR_range) native "IDBObjectStore__count_3_Callback"; | |
| 937 | |
| 938 Index $dom_createIndex(String name, keyPath, [Map options]) { | 818 Index $dom_createIndex(String name, keyPath, [Map options]) { |
| 939 if ((name is String || name == null) && (keyPath is List<String> || keyPath
== null) && (options is Map || options == null)) { | 819 if ((name is String || name == null) && (keyPath is List<String> || keyPath
== null) && (options is Map || options == null)) { |
| 940 return _createIndex_1(name, keyPath, options); | 820 return _createIndex_1(name, keyPath, options); |
| 941 } | 821 } |
| 942 if ((name is String || name == null) && (keyPath is String || keyPath == nul
l) && (options is Map || options == null)) { | 822 if ((name is String || name == null) && (keyPath is String || keyPath == nul
l) && (options is Map || options == null)) { |
| 943 return _createIndex_2(name, keyPath, options); | 823 return _createIndex_2(name, keyPath, options); |
| 944 } | 824 } |
| 945 throw new ArgumentError("Incorrect number or type of arguments"); | 825 throw new ArgumentError("Incorrect number or type of arguments"); |
| 946 } | 826 } |
| 947 | 827 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 991 | 871 |
| 992 @DomName('IDBObjectStore._get_2') | 872 @DomName('IDBObjectStore._get_2') |
| 993 @DocsEditable | 873 @DocsEditable |
| 994 Request _get_2(key) native "IDBObjectStore__get_2_Callback"; | 874 Request _get_2(key) native "IDBObjectStore__get_2_Callback"; |
| 995 | 875 |
| 996 @DomName('IDBObjectStore.index') | 876 @DomName('IDBObjectStore.index') |
| 997 @DocsEditable | 877 @DocsEditable |
| 998 Index index(String name) native "IDBObjectStore_index_Callback"; | 878 Index index(String name) native "IDBObjectStore_index_Callback"; |
| 999 | 879 |
| 1000 Request $dom_openCursor([key_OR_range, String direction]) { | 880 Request $dom_openCursor([key_OR_range, String direction]) { |
| 1001 if (!?key_OR_range && !?direction) { | |
| 1002 return _openCursor_1(); | |
| 1003 } | |
| 1004 if ((key_OR_range is KeyRange || key_OR_range == null) && !?direction) { | |
| 1005 return _openCursor_2(key_OR_range); | |
| 1006 } | |
| 1007 if ((key_OR_range is KeyRange || key_OR_range == null) && (direction is Stri
ng || direction == null)) { | 881 if ((key_OR_range is KeyRange || key_OR_range == null) && (direction is Stri
ng || direction == null)) { |
| 1008 return _openCursor_3(key_OR_range, direction); | 882 return _openCursor_1(key_OR_range, direction); |
| 1009 } | |
| 1010 if (?key_OR_range && !?direction) { | |
| 1011 return _openCursor_4(key_OR_range); | |
| 1012 } | 883 } |
| 1013 if (?key_OR_range && (direction is String || direction == null)) { | 884 if (?key_OR_range && (direction is String || direction == null)) { |
| 1014 return _openCursor_5(key_OR_range, direction); | 885 return _openCursor_2(key_OR_range, direction); |
| 1015 } | 886 } |
| 1016 throw new ArgumentError("Incorrect number or type of arguments"); | 887 throw new ArgumentError("Incorrect number or type of arguments"); |
| 1017 } | 888 } |
| 1018 | 889 |
| 1019 @DomName('IDBObjectStore._openCursor_1') | 890 @DomName('IDBObjectStore._openCursor_1') |
| 1020 @DocsEditable | 891 @DocsEditable |
| 1021 Request _openCursor_1() native "IDBObjectStore__openCursor_1_Callback"; | 892 Request _openCursor_1(key_OR_range, direction) native "IDBObjectStore__openCur
sor_1_Callback"; |
| 1022 | 893 |
| 1023 @DomName('IDBObjectStore._openCursor_2') | 894 @DomName('IDBObjectStore._openCursor_2') |
| 1024 @DocsEditable | 895 @DocsEditable |
| 1025 Request _openCursor_2(key_OR_range) native "IDBObjectStore__openCursor_2_Callb
ack"; | 896 Request _openCursor_2(key_OR_range, direction) native "IDBObjectStore__openCur
sor_2_Callback"; |
| 1026 | 897 |
| 1027 @DomName('IDBObjectStore._openCursor_3') | 898 @DomName('IDBObjectStore.put') |
| 1028 @DocsEditable | 899 @DocsEditable |
| 1029 Request _openCursor_3(key_OR_range, direction) native "IDBObjectStore__openCur
sor_3_Callback"; | 900 Request $dom_put(Object value, [Object key]) native "IDBObjectStore_put_Callba
ck"; |
| 1030 | |
| 1031 @DomName('IDBObjectStore._openCursor_4') | |
| 1032 @DocsEditable | |
| 1033 Request _openCursor_4(key_OR_range) native "IDBObjectStore__openCursor_4_Callb
ack"; | |
| 1034 | |
| 1035 @DomName('IDBObjectStore._openCursor_5') | |
| 1036 @DocsEditable | |
| 1037 Request _openCursor_5(key_OR_range, direction) native "IDBObjectStore__openCur
sor_5_Callback"; | |
| 1038 | |
| 1039 Request $dom_put(Object value, [Object key]) { | |
| 1040 if (?key) { | |
| 1041 return _put_1(value, key); | |
| 1042 } | |
| 1043 return _put_2(value); | |
| 1044 } | |
| 1045 | |
| 1046 @DomName('IDBObjectStore._put_1') | |
| 1047 @DocsEditable | |
| 1048 Request _put_1(value, key) native "IDBObjectStore__put_1_Callback"; | |
| 1049 | |
| 1050 @DomName('IDBObjectStore._put_2') | |
| 1051 @DocsEditable | |
| 1052 Request _put_2(value) native "IDBObjectStore__put_2_Callback"; | |
| 1053 | 901 |
| 1054 | 902 |
| 1055 /** | 903 /** |
| 1056 * Helper for iterating over cursors in a request. | 904 * Helper for iterating over cursors in a request. |
| 1057 */ | 905 */ |
| 1058 static Stream<Cursor> _cursorStreamFromResult(Request request, | 906 static Stream<Cursor> _cursorStreamFromResult(Request request, |
| 1059 bool autoAdvance) { | 907 bool autoAdvance) { |
| 1060 // TODO: need to guarantee that the controller provides the values | 908 // TODO: need to guarantee that the controller provides the values |
| 1061 // immediately as waiting until the next tick will cause the transaction to | 909 // immediately as waiting until the next tick will cause the transaction to |
| 1062 // close. | 910 // close. |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1304 | 1152 |
| 1305 // WARNING: Do not edit - generated code. | 1153 // WARNING: Do not edit - generated code. |
| 1306 | 1154 |
| 1307 | 1155 |
| 1308 @DocsEditable | 1156 @DocsEditable |
| 1309 @DomName('IDBAny') | 1157 @DomName('IDBAny') |
| 1310 abstract class _IDBAny extends NativeFieldWrapperClass1 { | 1158 abstract class _IDBAny extends NativeFieldWrapperClass1 { |
| 1311 _IDBAny.internal(); | 1159 _IDBAny.internal(); |
| 1312 | 1160 |
| 1313 } | 1161 } |
| OLD | NEW |