| 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 // 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 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 @JSName('getKey') | 486 @JSName('getKey') |
| 487 @DocsEditable | 487 @DocsEditable |
| 488 @DomName('IDBIndex.getKey') | 488 @DomName('IDBIndex.getKey') |
| 489 @Returns('Request') | 489 @Returns('Request') |
| 490 @Creates('Request') | 490 @Creates('Request') |
| 491 @annotation_Creates_SerializedScriptValue | 491 @annotation_Creates_SerializedScriptValue |
| 492 @Creates('ObjectStore') | 492 @Creates('ObjectStore') |
| 493 Request _getKey_2(key) native; | 493 Request _getKey_2(key) native; |
| 494 | 494 |
| 495 Request openCursor([key_OR_range, String direction]) { | 495 Request openCursor([key_OR_range, String direction]) { |
| 496 if (!?key_OR_range && | 496 if (!?key_OR_range && !?direction) { |
| 497 !?direction) { | |
| 498 return _openCursor_1(); | 497 return _openCursor_1(); |
| 499 } | 498 } |
| 500 if ((key_OR_range is KeyRange || key_OR_range == null) && | 499 if ((key_OR_range is KeyRange || key_OR_range == null) && !?direction) { |
| 501 !?direction) { | |
| 502 return _openCursor_2(key_OR_range); | 500 return _openCursor_2(key_OR_range); |
| 503 } | 501 } |
| 504 if ((key_OR_range is KeyRange || key_OR_range == null)) { | 502 if ((key_OR_range is KeyRange || key_OR_range == null)) { |
| 505 return _openCursor_3(key_OR_range, direction); | 503 return _openCursor_3(key_OR_range, direction); |
| 506 } | 504 } |
| 507 if (?key_OR_range && | 505 if (?key_OR_range && !?direction) { |
| 508 !?direction) { | |
| 509 var key_1 = _convertDartToNative_IDBKey(key_OR_range); | 506 var key_1 = _convertDartToNative_IDBKey(key_OR_range); |
| 510 return _openCursor_4(key_1); | 507 return _openCursor_4(key_1); |
| 511 } | 508 } |
| 512 if (?key_OR_range) { | 509 if (?key_OR_range) { |
| 513 var key_2 = _convertDartToNative_IDBKey(key_OR_range); | 510 var key_2 = _convertDartToNative_IDBKey(key_OR_range); |
| 514 return _openCursor_5(key_2, direction); | 511 return _openCursor_5(key_2, direction); |
| 515 } | 512 } |
| 516 throw new ArgumentError("Incorrect number or type of arguments"); | 513 throw new ArgumentError("Incorrect number or type of arguments"); |
| 517 } | 514 } |
| 518 @JSName('openCursor') | 515 @JSName('openCursor') |
| (...skipping 26 matching lines...) Expand all Loading... |
| 545 Request _openCursor_4(key) native; | 542 Request _openCursor_4(key) native; |
| 546 @JSName('openCursor') | 543 @JSName('openCursor') |
| 547 @DocsEditable | 544 @DocsEditable |
| 548 @DomName('IDBIndex.openCursor') | 545 @DomName('IDBIndex.openCursor') |
| 549 @Returns('Request') | 546 @Returns('Request') |
| 550 @Creates('Request') | 547 @Creates('Request') |
| 551 @Creates('Cursor') | 548 @Creates('Cursor') |
| 552 Request _openCursor_5(key, direction) native; | 549 Request _openCursor_5(key, direction) native; |
| 553 | 550 |
| 554 Request openKeyCursor([key_OR_range, String direction]) { | 551 Request openKeyCursor([key_OR_range, String direction]) { |
| 555 if (!?key_OR_range && | 552 if (!?key_OR_range && !?direction) { |
| 556 !?direction) { | |
| 557 return _openKeyCursor_1(); | 553 return _openKeyCursor_1(); |
| 558 } | 554 } |
| 559 if ((key_OR_range is KeyRange || key_OR_range == null) && | 555 if ((key_OR_range is KeyRange || key_OR_range == null) && !?direction) { |
| 560 !?direction) { | |
| 561 return _openKeyCursor_2(key_OR_range); | 556 return _openKeyCursor_2(key_OR_range); |
| 562 } | 557 } |
| 563 if ((key_OR_range is KeyRange || key_OR_range == null)) { | 558 if ((key_OR_range is KeyRange || key_OR_range == null)) { |
| 564 return _openKeyCursor_3(key_OR_range, direction); | 559 return _openKeyCursor_3(key_OR_range, direction); |
| 565 } | 560 } |
| 566 if (?key_OR_range && | 561 if (?key_OR_range && !?direction) { |
| 567 !?direction) { | |
| 568 var key_1 = _convertDartToNative_IDBKey(key_OR_range); | 562 var key_1 = _convertDartToNative_IDBKey(key_OR_range); |
| 569 return _openKeyCursor_4(key_1); | 563 return _openKeyCursor_4(key_1); |
| 570 } | 564 } |
| 571 if (?key_OR_range) { | 565 if (?key_OR_range) { |
| 572 var key_2 = _convertDartToNative_IDBKey(key_OR_range); | 566 var key_2 = _convertDartToNative_IDBKey(key_OR_range); |
| 573 return _openKeyCursor_5(key_2, direction); | 567 return _openKeyCursor_5(key_2, direction); |
| 574 } | 568 } |
| 575 throw new ArgumentError("Incorrect number or type of arguments"); | 569 throw new ArgumentError("Incorrect number or type of arguments"); |
| 576 } | 570 } |
| 577 @JSName('openKeyCursor') | 571 @JSName('openKeyCursor') |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 819 @JSName('count') | 813 @JSName('count') |
| 820 @DocsEditable | 814 @DocsEditable |
| 821 @DomName('IDBObjectStore.count') | 815 @DomName('IDBObjectStore.count') |
| 822 Request _count_2(KeyRange range) native; | 816 Request _count_2(KeyRange range) native; |
| 823 @JSName('count') | 817 @JSName('count') |
| 824 @DocsEditable | 818 @DocsEditable |
| 825 @DomName('IDBObjectStore.count') | 819 @DomName('IDBObjectStore.count') |
| 826 Request _count_3(key) native; | 820 Request _count_3(key) native; |
| 827 | 821 |
| 828 Index createIndex(String name, keyPath, [Map options]) { | 822 Index createIndex(String name, keyPath, [Map options]) { |
| 829 if ((keyPath is List<String> || keyPath == null) && | 823 if ((keyPath is List<String> || keyPath == null) && !?options) { |
| 830 !?options) { | |
| 831 return _createIndex_1(name, keyPath); | 824 return _createIndex_1(name, keyPath); |
| 832 } | 825 } |
| 833 if ((keyPath is List<String> || keyPath == null)) { | 826 if ((keyPath is List<String> || keyPath == null)) { |
| 834 var options_1 = convertDartToNative_Dictionary(options); | 827 var options_1 = convertDartToNative_Dictionary(options); |
| 835 return _createIndex_2(name, keyPath, options_1); | 828 return _createIndex_2(name, keyPath, options_1); |
| 836 } | 829 } |
| 837 if ((keyPath is String || keyPath == null) && | 830 if ((keyPath is String || keyPath == null) && !?options) { |
| 838 !?options) { | |
| 839 return _createIndex_3(name, keyPath); | 831 return _createIndex_3(name, keyPath); |
| 840 } | 832 } |
| 841 if ((keyPath is String || keyPath == null)) { | 833 if ((keyPath is String || keyPath == null)) { |
| 842 var options_2 = convertDartToNative_Dictionary(options); | 834 var options_2 = convertDartToNative_Dictionary(options); |
| 843 return _createIndex_4(name, keyPath, options_2); | 835 return _createIndex_4(name, keyPath, options_2); |
| 844 } | 836 } |
| 845 throw new ArgumentError("Incorrect number or type of arguments"); | 837 throw new ArgumentError("Incorrect number or type of arguments"); |
| 846 } | 838 } |
| 847 @JSName('createIndex') | 839 @JSName('createIndex') |
| 848 @DocsEditable | 840 @DocsEditable |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 907 @Returns('Request') | 899 @Returns('Request') |
| 908 @Creates('Request') | 900 @Creates('Request') |
| 909 @annotation_Creates_SerializedScriptValue | 901 @annotation_Creates_SerializedScriptValue |
| 910 Request _getObject_2(key) native; | 902 Request _getObject_2(key) native; |
| 911 | 903 |
| 912 @DocsEditable | 904 @DocsEditable |
| 913 @DomName('IDBObjectStore.index') | 905 @DomName('IDBObjectStore.index') |
| 914 Index index(String name) native; | 906 Index index(String name) native; |
| 915 | 907 |
| 916 Request openCursor([key_OR_range, String direction]) { | 908 Request openCursor([key_OR_range, String direction]) { |
| 917 if (!?key_OR_range && | 909 if (!?key_OR_range && !?direction) { |
| 918 !?direction) { | |
| 919 return _openCursor_1(); | 910 return _openCursor_1(); |
| 920 } | 911 } |
| 921 if ((key_OR_range is KeyRange || key_OR_range == null) && | 912 if ((key_OR_range is KeyRange || key_OR_range == null) && !?direction) { |
| 922 !?direction) { | |
| 923 return _openCursor_2(key_OR_range); | 913 return _openCursor_2(key_OR_range); |
| 924 } | 914 } |
| 925 if ((key_OR_range is KeyRange || key_OR_range == null)) { | 915 if ((key_OR_range is KeyRange || key_OR_range == null)) { |
| 926 return _openCursor_3(key_OR_range, direction); | 916 return _openCursor_3(key_OR_range, direction); |
| 927 } | 917 } |
| 928 if (?key_OR_range && | 918 if (?key_OR_range && !?direction) { |
| 929 !?direction) { | |
| 930 var key_1 = _convertDartToNative_IDBKey(key_OR_range); | 919 var key_1 = _convertDartToNative_IDBKey(key_OR_range); |
| 931 return _openCursor_4(key_1); | 920 return _openCursor_4(key_1); |
| 932 } | 921 } |
| 933 if (?key_OR_range) { | 922 if (?key_OR_range) { |
| 934 var key_2 = _convertDartToNative_IDBKey(key_OR_range); | 923 var key_2 = _convertDartToNative_IDBKey(key_OR_range); |
| 935 return _openCursor_5(key_2, direction); | 924 return _openCursor_5(key_2, direction); |
| 936 } | 925 } |
| 937 throw new ArgumentError("Incorrect number or type of arguments"); | 926 throw new ArgumentError("Incorrect number or type of arguments"); |
| 938 } | 927 } |
| 939 @JSName('openCursor') | 928 @JSName('openCursor') |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1285 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1274 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 1286 // for details. All rights reserved. Use of this source code is governed by a | 1275 // for details. All rights reserved. Use of this source code is governed by a |
| 1287 // BSD-style license that can be found in the LICENSE file. | 1276 // BSD-style license that can be found in the LICENSE file. |
| 1288 | 1277 |
| 1289 | 1278 |
| 1290 | 1279 |
| 1291 @DocsEditable | 1280 @DocsEditable |
| 1292 @DomName('IDBAny') | 1281 @DomName('IDBAny') |
| 1293 class _Any native "*IDBAny" { | 1282 class _Any native "*IDBAny" { |
| 1294 } | 1283 } |
| OLD | NEW |