| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 Object get primaryKey native "IDBCursor_primaryKey_Getter"; | 58 Object get primaryKey native "IDBCursor_primaryKey_Getter"; |
| 59 | 59 |
| 60 @DomName('IDBCursor.source') | 60 @DomName('IDBCursor.source') |
| 61 @DocsEditable | 61 @DocsEditable |
| 62 dynamic get source native "IDBCursor_source_Getter"; | 62 dynamic get source native "IDBCursor_source_Getter"; |
| 63 | 63 |
| 64 @DomName('IDBCursor.advance') | 64 @DomName('IDBCursor.advance') |
| 65 @DocsEditable | 65 @DocsEditable |
| 66 void advance(int count) native "IDBCursor_advance_Callback"; | 66 void advance(int count) native "IDBCursor_advance_Callback"; |
| 67 | 67 |
| 68 void continueFunction([/*IDBKey*/ key]) { | 68 void continue([key]) { |
| 69 if (?key) { | 69 if (!?key) { |
| 70 _continue_1(key); | 70 _continue_1(); |
| 71 return; | 71 return; |
| 72 } | 72 } |
| 73 _continue_2(); | 73 if (?key) { |
| 74 return; | 74 _continue_2(key); |
| 75 return; |
| 76 } |
| 77 if (!?key) { |
| 78 _continue_3(); |
| 79 return; |
| 80 } |
| 81 if (?key) { |
| 82 _continue_4(key); |
| 83 return; |
| 84 } |
| 85 throw new ArgumentError("Incorrect number or type of arguments"); |
| 75 } | 86 } |
| 76 | 87 |
| 77 @DomName('IDBCursor._continue_1') | 88 @DomName('IDBCursor._continue_1') |
| 78 @DocsEditable | 89 @DocsEditable |
| 79 void _continue_1(key) native "IDBCursor__continue_1_Callback"; | 90 void _continue_1() native "IDBCursor__continue_1_Callback"; |
| 80 | 91 |
| 81 @DomName('IDBCursor._continue_2') | 92 @DomName('IDBCursor._continue_2') |
| 82 @DocsEditable | 93 @DocsEditable |
| 83 void _continue_2() native "IDBCursor__continue_2_Callback"; | 94 void _continue_2(key) native "IDBCursor__continue_2_Callback"; |
| 95 |
| 96 @DomName('IDBCursor._continue_3') |
| 97 @DocsEditable |
| 98 void _continue_3() native "IDBCursor__continue_3_Callback"; |
| 99 |
| 100 @DomName('IDBCursor._continue_4') |
| 101 @DocsEditable |
| 102 void _continue_4(key) native "IDBCursor__continue_4_Callback"; |
| 84 | 103 |
| 85 @DomName('IDBCursor.delete') | 104 @DomName('IDBCursor.delete') |
| 86 @DocsEditable | 105 @DocsEditable |
| 87 Request delete() native "IDBCursor_delete_Callback"; | 106 Request delete() native "IDBCursor_delete_Callback"; |
| 88 | 107 |
| 89 @DomName('IDBCursor.update') | 108 @DomName('IDBCursor.update') |
| 90 @DocsEditable | 109 @DocsEditable |
| 91 Request update(Object value) native "IDBCursor_update_Callback"; | 110 Request update(Object value) native "IDBCursor_update_Callback"; |
| 92 | 111 |
| 93 } | 112 } |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 @DocsEditable | 356 @DocsEditable |
| 338 Request _count_3(key_OR_range) native "IDBIndex__count_3_Callback"; | 357 Request _count_3(key_OR_range) native "IDBIndex__count_3_Callback"; |
| 339 | 358 |
| 340 Request get(key) { | 359 Request get(key) { |
| 341 if ((key is KeyRange || key == null)) { | 360 if ((key is KeyRange || key == null)) { |
| 342 return _get_1(key); | 361 return _get_1(key); |
| 343 } | 362 } |
| 344 if (?key) { | 363 if (?key) { |
| 345 return _get_2(key); | 364 return _get_2(key); |
| 346 } | 365 } |
| 366 if (?key) { |
| 367 return _get_3(key); |
| 368 } |
| 347 throw new ArgumentError("Incorrect number or type of arguments"); | 369 throw new ArgumentError("Incorrect number or type of arguments"); |
| 348 } | 370 } |
| 349 | 371 |
| 350 @DomName('IDBIndex._get_1') | 372 @DomName('IDBIndex._get_1') |
| 351 @DocsEditable | 373 @DocsEditable |
| 352 Request _get_1(key) native "IDBIndex__get_1_Callback"; | 374 Request _get_1(key) native "IDBIndex__get_1_Callback"; |
| 353 | 375 |
| 354 @DomName('IDBIndex._get_2') | 376 @DomName('IDBIndex._get_2') |
| 355 @DocsEditable | 377 @DocsEditable |
| 356 Request _get_2(key) native "IDBIndex__get_2_Callback"; | 378 Request _get_2(key) native "IDBIndex__get_2_Callback"; |
| 357 | 379 |
| 380 @DomName('IDBIndex._get_3') |
| 381 @DocsEditable |
| 382 Request _get_3(key) native "IDBIndex__get_3_Callback"; |
| 383 |
| 358 Request getKey(key) { | 384 Request getKey(key) { |
| 359 if ((key is KeyRange || key == null)) { | 385 if ((key is KeyRange || key == null)) { |
| 360 return _getKey_1(key); | 386 return _getKey_1(key); |
| 361 } | 387 } |
| 362 if (?key) { | 388 if (?key) { |
| 363 return _getKey_2(key); | 389 return _getKey_2(key); |
| 364 } | 390 } |
| 365 throw new ArgumentError("Incorrect number or type of arguments"); | 391 throw new ArgumentError("Incorrect number or type of arguments"); |
| 366 } | 392 } |
| 367 | 393 |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 bool get lowerOpen native "IDBKeyRange_lowerOpen_Getter"; | 527 bool get lowerOpen native "IDBKeyRange_lowerOpen_Getter"; |
| 502 | 528 |
| 503 @DomName('IDBKeyRange.upper') | 529 @DomName('IDBKeyRange.upper') |
| 504 @DocsEditable | 530 @DocsEditable |
| 505 dynamic get upper native "IDBKeyRange_upper_Getter"; | 531 dynamic get upper native "IDBKeyRange_upper_Getter"; |
| 506 | 532 |
| 507 @DomName('IDBKeyRange.upperOpen') | 533 @DomName('IDBKeyRange.upperOpen') |
| 508 @DocsEditable | 534 @DocsEditable |
| 509 bool get upperOpen native "IDBKeyRange_upperOpen_Getter"; | 535 bool get upperOpen native "IDBKeyRange_upperOpen_Getter"; |
| 510 | 536 |
| 511 static KeyRange bound_(/*IDBKey*/ lower, /*IDBKey*/ upper, [bool lowerOpen, bo
ol upperOpen]) { | 537 static KeyRange bound(/*IDBKey*/ lower, /*IDBKey*/ upper, [bool lowerOpen, boo
l upperOpen]) { |
| 512 if (?upperOpen) { | 538 if (?upperOpen) { |
| 513 return _bound_1(lower, upper, lowerOpen, upperOpen); | 539 return _bound_1(lower, upper, lowerOpen, upperOpen); |
| 514 } | 540 } |
| 515 if (?lowerOpen) { | 541 if (?lowerOpen) { |
| 516 return _bound_2(lower, upper, lowerOpen); | 542 return _bound_2(lower, upper, lowerOpen); |
| 517 } | 543 } |
| 518 return _bound_3(lower, upper); | 544 return _bound_3(lower, upper); |
| 519 } | 545 } |
| 520 | 546 |
| 521 @DomName('IDBKeyRange._bound_1') | 547 @DomName('IDBKeyRange._bound_1') |
| 522 @DocsEditable | 548 @DocsEditable |
| 523 static KeyRange _bound_1(lower, upper, lowerOpen, upperOpen) native "IDBKeyRan
ge__bound_1_Callback"; | 549 static KeyRange _bound_1(lower, upper, lowerOpen, upperOpen) native "IDBKeyRan
ge__bound_1_Callback"; |
| 524 | 550 |
| 525 @DomName('IDBKeyRange._bound_2') | 551 @DomName('IDBKeyRange._bound_2') |
| 526 @DocsEditable | 552 @DocsEditable |
| 527 static KeyRange _bound_2(lower, upper, lowerOpen) native "IDBKeyRange__bound_2
_Callback"; | 553 static KeyRange _bound_2(lower, upper, lowerOpen) native "IDBKeyRange__bound_2
_Callback"; |
| 528 | 554 |
| 529 @DomName('IDBKeyRange._bound_3') | 555 @DomName('IDBKeyRange._bound_3') |
| 530 @DocsEditable | 556 @DocsEditable |
| 531 static KeyRange _bound_3(lower, upper) native "IDBKeyRange__bound_3_Callback"; | 557 static KeyRange _bound_3(lower, upper) native "IDBKeyRange__bound_3_Callback"; |
| 532 | 558 |
| 533 static KeyRange lowerBound_(/*IDBKey*/ bound, [bool open]) { | 559 static KeyRange lowerBound(/*IDBKey*/ bound, [bool open]) { |
| 534 if (?open) { | 560 if (?open) { |
| 535 return _lowerBound_1(bound, open); | 561 return _lowerBound_1(bound, open); |
| 536 } | 562 } |
| 537 return _lowerBound_2(bound); | 563 return _lowerBound_2(bound); |
| 538 } | 564 } |
| 539 | 565 |
| 540 @DomName('IDBKeyRange._lowerBound_1') | 566 @DomName('IDBKeyRange._lowerBound_1') |
| 541 @DocsEditable | 567 @DocsEditable |
| 542 static KeyRange _lowerBound_1(bound, open) native "IDBKeyRange__lowerBound_1_C
allback"; | 568 static KeyRange _lowerBound_1(bound, open) native "IDBKeyRange__lowerBound_1_C
allback"; |
| 543 | 569 |
| 544 @DomName('IDBKeyRange._lowerBound_2') | 570 @DomName('IDBKeyRange._lowerBound_2') |
| 545 @DocsEditable | 571 @DocsEditable |
| 546 static KeyRange _lowerBound_2(bound) native "IDBKeyRange__lowerBound_2_Callbac
k"; | 572 static KeyRange _lowerBound_2(bound) native "IDBKeyRange__lowerBound_2_Callbac
k"; |
| 547 | 573 |
| 548 @DomName('IDBKeyRange.only_') | 574 @DomName('IDBKeyRange.only') |
| 549 @DocsEditable | 575 @DocsEditable |
| 550 static KeyRange only_(/*IDBKey*/ value) native "IDBKeyRange_only__Callback"; | 576 static KeyRange only(/*IDBKey*/ value) native "IDBKeyRange_only_Callback"; |
| 551 | 577 |
| 552 static KeyRange upperBound_(/*IDBKey*/ bound, [bool open]) { | 578 static KeyRange upperBound(/*IDBKey*/ bound, [bool open]) { |
| 553 if (?open) { | 579 if (?open) { |
| 554 return _upperBound_1(bound, open); | 580 return _upperBound_1(bound, open); |
| 555 } | 581 } |
| 556 return _upperBound_2(bound); | 582 return _upperBound_2(bound); |
| 557 } | 583 } |
| 558 | 584 |
| 559 @DomName('IDBKeyRange._upperBound_1') | 585 @DomName('IDBKeyRange._upperBound_1') |
| 560 @DocsEditable | 586 @DocsEditable |
| 561 static KeyRange _upperBound_1(bound, open) native "IDBKeyRange__upperBound_1_C
allback"; | 587 static KeyRange _upperBound_1(bound, open) native "IDBKeyRange__upperBound_1_C
allback"; |
| 562 | 588 |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 681 @DocsEditable | 707 @DocsEditable |
| 682 void deleteIndex(String name) native "IDBObjectStore_deleteIndex_Callback"; | 708 void deleteIndex(String name) native "IDBObjectStore_deleteIndex_Callback"; |
| 683 | 709 |
| 684 Request getObject(key) { | 710 Request getObject(key) { |
| 685 if ((key is KeyRange || key == null)) { | 711 if ((key is KeyRange || key == null)) { |
| 686 return _get_1(key); | 712 return _get_1(key); |
| 687 } | 713 } |
| 688 if (?key) { | 714 if (?key) { |
| 689 return _get_2(key); | 715 return _get_2(key); |
| 690 } | 716 } |
| 717 if (?key) { |
| 718 return _get_3(key); |
| 719 } |
| 691 throw new ArgumentError("Incorrect number or type of arguments"); | 720 throw new ArgumentError("Incorrect number or type of arguments"); |
| 692 } | 721 } |
| 693 | 722 |
| 694 @DomName('IDBObjectStore._get_1') | 723 @DomName('IDBObjectStore._get_1') |
| 695 @DocsEditable | 724 @DocsEditable |
| 696 Request _get_1(key) native "IDBObjectStore__get_1_Callback"; | 725 Request _get_1(key) native "IDBObjectStore__get_1_Callback"; |
| 697 | 726 |
| 698 @DomName('IDBObjectStore._get_2') | 727 @DomName('IDBObjectStore._get_2') |
| 699 @DocsEditable | 728 @DocsEditable |
| 700 Request _get_2(key) native "IDBObjectStore__get_2_Callback"; | 729 Request _get_2(key) native "IDBObjectStore__get_2_Callback"; |
| 701 | 730 |
| 731 @DomName('IDBObjectStore._get_3') |
| 732 @DocsEditable |
| 733 Request _get_3(key) native "IDBObjectStore__get_3_Callback"; |
| 734 |
| 702 @DomName('IDBObjectStore.index') | 735 @DomName('IDBObjectStore.index') |
| 703 @DocsEditable | 736 @DocsEditable |
| 704 Index index(String name) native "IDBObjectStore_index_Callback"; | 737 Index index(String name) native "IDBObjectStore_index_Callback"; |
| 705 | 738 |
| 706 Request openCursor([key_OR_range, String direction]) { | 739 Request openCursor([key_OR_range, String direction]) { |
| 707 if (!?key_OR_range && !?direction) { | 740 if (!?key_OR_range && !?direction) { |
| 708 return _openCursor_1(); | 741 return _openCursor_1(); |
| 709 } | 742 } |
| 710 if ((key_OR_range is KeyRange || key_OR_range == null) && !?direction) { | 743 if ((key_OR_range is KeyRange || key_OR_range == null) && !?direction) { |
| 711 return _openCursor_2(key_OR_range); | 744 return _openCursor_2(key_OR_range); |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1066 | 1099 |
| 1067 // WARNING: Do not edit - generated code. | 1100 // WARNING: Do not edit - generated code. |
| 1068 | 1101 |
| 1069 | 1102 |
| 1070 @DocsEditable | 1103 @DocsEditable |
| 1071 @DomName('IDBAny') | 1104 @DomName('IDBAny') |
| 1072 class _Any extends NativeFieldWrapperClass1 { | 1105 class _Any extends NativeFieldWrapperClass1 { |
| 1073 _Any.internal(); | 1106 _Any.internal(); |
| 1074 | 1107 |
| 1075 } | 1108 } |
| OLD | NEW |