| 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 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 @JSName('getKey') | 481 @JSName('getKey') |
| 482 @DomName('IDBIndex.getKey') | 482 @DomName('IDBIndex.getKey') |
| 483 @DocsEditable | 483 @DocsEditable |
| 484 @Returns('Request') | 484 @Returns('Request') |
| 485 @Creates('Request') | 485 @Creates('Request') |
| 486 @annotation_Creates_SerializedScriptValue | 486 @annotation_Creates_SerializedScriptValue |
| 487 @Creates('ObjectStore') | 487 @Creates('ObjectStore') |
| 488 Request _getKey_2(key) native; | 488 Request _getKey_2(key) native; |
| 489 | 489 |
| 490 Request openCursor([key_OR_range, String direction]) { | 490 Request openCursor([key_OR_range, String direction]) { |
| 491 if (!?key_OR_range && | 491 if (!?key_OR_range && !?direction) { |
| 492 !?direction) { | |
| 493 return _openCursor_1(); | 492 return _openCursor_1(); |
| 494 } | 493 } |
| 495 if ((key_OR_range is KeyRange || key_OR_range == null) && | 494 if ((key_OR_range is KeyRange || key_OR_range == null) && !?direction) { |
| 496 !?direction) { | |
| 497 return _openCursor_2(key_OR_range); | 495 return _openCursor_2(key_OR_range); |
| 498 } | 496 } |
| 499 if ((key_OR_range is KeyRange || key_OR_range == null)) { | 497 if ((key_OR_range is KeyRange || key_OR_range == null)) { |
| 500 return _openCursor_3(key_OR_range, direction); | 498 return _openCursor_3(key_OR_range, direction); |
| 501 } | 499 } |
| 502 if (?key_OR_range && | 500 if (?key_OR_range && !?direction) { |
| 503 !?direction) { | |
| 504 var key_1 = _convertDartToNative_IDBKey(key_OR_range); | 501 var key_1 = _convertDartToNative_IDBKey(key_OR_range); |
| 505 return _openCursor_4(key_1); | 502 return _openCursor_4(key_1); |
| 506 } | 503 } |
| 507 if (?key_OR_range) { | 504 if (?key_OR_range) { |
| 508 var key_2 = _convertDartToNative_IDBKey(key_OR_range); | 505 var key_2 = _convertDartToNative_IDBKey(key_OR_range); |
| 509 return _openCursor_5(key_2, direction); | 506 return _openCursor_5(key_2, direction); |
| 510 } | 507 } |
| 511 throw new ArgumentError("Incorrect number or type of arguments"); | 508 throw new ArgumentError("Incorrect number or type of arguments"); |
| 512 } | 509 } |
| 513 @JSName('openCursor') | 510 @JSName('openCursor') |
| (...skipping 26 matching lines...) Expand all Loading... |
| 540 Request _openCursor_4(key) native; | 537 Request _openCursor_4(key) native; |
| 541 @JSName('openCursor') | 538 @JSName('openCursor') |
| 542 @DomName('IDBIndex.openCursor') | 539 @DomName('IDBIndex.openCursor') |
| 543 @DocsEditable | 540 @DocsEditable |
| 544 @Returns('Request') | 541 @Returns('Request') |
| 545 @Creates('Request') | 542 @Creates('Request') |
| 546 @Creates('Cursor') | 543 @Creates('Cursor') |
| 547 Request _openCursor_5(key, direction) native; | 544 Request _openCursor_5(key, direction) native; |
| 548 | 545 |
| 549 Request openKeyCursor([key_OR_range, String direction]) { | 546 Request openKeyCursor([key_OR_range, String direction]) { |
| 550 if (!?key_OR_range && | 547 if (!?key_OR_range && !?direction) { |
| 551 !?direction) { | |
| 552 return _openKeyCursor_1(); | 548 return _openKeyCursor_1(); |
| 553 } | 549 } |
| 554 if ((key_OR_range is KeyRange || key_OR_range == null) && | 550 if ((key_OR_range is KeyRange || key_OR_range == null) && !?direction) { |
| 555 !?direction) { | |
| 556 return _openKeyCursor_2(key_OR_range); | 551 return _openKeyCursor_2(key_OR_range); |
| 557 } | 552 } |
| 558 if ((key_OR_range is KeyRange || key_OR_range == null)) { | 553 if ((key_OR_range is KeyRange || key_OR_range == null)) { |
| 559 return _openKeyCursor_3(key_OR_range, direction); | 554 return _openKeyCursor_3(key_OR_range, direction); |
| 560 } | 555 } |
| 561 if (?key_OR_range && | 556 if (?key_OR_range && !?direction) { |
| 562 !?direction) { | |
| 563 var key_1 = _convertDartToNative_IDBKey(key_OR_range); | 557 var key_1 = _convertDartToNative_IDBKey(key_OR_range); |
| 564 return _openKeyCursor_4(key_1); | 558 return _openKeyCursor_4(key_1); |
| 565 } | 559 } |
| 566 if (?key_OR_range) { | 560 if (?key_OR_range) { |
| 567 var key_2 = _convertDartToNative_IDBKey(key_OR_range); | 561 var key_2 = _convertDartToNative_IDBKey(key_OR_range); |
| 568 return _openKeyCursor_5(key_2, direction); | 562 return _openKeyCursor_5(key_2, direction); |
| 569 } | 563 } |
| 570 throw new ArgumentError("Incorrect number or type of arguments"); | 564 throw new ArgumentError("Incorrect number or type of arguments"); |
| 571 } | 565 } |
| 572 @JSName('openKeyCursor') | 566 @JSName('openKeyCursor') |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 811 @JSName('count') | 805 @JSName('count') |
| 812 @DomName('IDBObjectStore.count') | 806 @DomName('IDBObjectStore.count') |
| 813 @DocsEditable | 807 @DocsEditable |
| 814 Request _count_2(KeyRange range) native; | 808 Request _count_2(KeyRange range) native; |
| 815 @JSName('count') | 809 @JSName('count') |
| 816 @DomName('IDBObjectStore.count') | 810 @DomName('IDBObjectStore.count') |
| 817 @DocsEditable | 811 @DocsEditable |
| 818 Request _count_3(key) native; | 812 Request _count_3(key) native; |
| 819 | 813 |
| 820 Index createIndex(String name, keyPath, [Map options]) { | 814 Index createIndex(String name, keyPath, [Map options]) { |
| 821 if ((keyPath is List<String> || keyPath == null) && | 815 if ((keyPath is List<String> || keyPath == null) && !?options) { |
| 822 !?options) { | |
| 823 return _createIndex_1(name, keyPath); | 816 return _createIndex_1(name, keyPath); |
| 824 } | 817 } |
| 825 if ((keyPath is List<String> || keyPath == null)) { | 818 if ((keyPath is List<String> || keyPath == null)) { |
| 826 var options_1 = convertDartToNative_Dictionary(options); | 819 var options_1 = convertDartToNative_Dictionary(options); |
| 827 return _createIndex_2(name, keyPath, options_1); | 820 return _createIndex_2(name, keyPath, options_1); |
| 828 } | 821 } |
| 829 if ((keyPath is String || keyPath == null) && | 822 if ((keyPath is String || keyPath == null) && !?options) { |
| 830 !?options) { | |
| 831 return _createIndex_3(name, keyPath); | 823 return _createIndex_3(name, keyPath); |
| 832 } | 824 } |
| 833 if ((keyPath is String || keyPath == null)) { | 825 if ((keyPath is String || keyPath == null)) { |
| 834 var options_2 = convertDartToNative_Dictionary(options); | 826 var options_2 = convertDartToNative_Dictionary(options); |
| 835 return _createIndex_4(name, keyPath, options_2); | 827 return _createIndex_4(name, keyPath, options_2); |
| 836 } | 828 } |
| 837 throw new ArgumentError("Incorrect number or type of arguments"); | 829 throw new ArgumentError("Incorrect number or type of arguments"); |
| 838 } | 830 } |
| 839 @JSName('createIndex') | 831 @JSName('createIndex') |
| 840 @DomName('IDBObjectStore.createIndex') | 832 @DomName('IDBObjectStore.createIndex') |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 899 @Returns('Request') | 891 @Returns('Request') |
| 900 @Creates('Request') | 892 @Creates('Request') |
| 901 @annotation_Creates_SerializedScriptValue | 893 @annotation_Creates_SerializedScriptValue |
| 902 Request _getObject_2(key) native; | 894 Request _getObject_2(key) native; |
| 903 | 895 |
| 904 @DomName('IDBObjectStore.index') | 896 @DomName('IDBObjectStore.index') |
| 905 @DocsEditable | 897 @DocsEditable |
| 906 Index index(String name) native; | 898 Index index(String name) native; |
| 907 | 899 |
| 908 Request openCursor([key_OR_range, String direction]) { | 900 Request openCursor([key_OR_range, String direction]) { |
| 909 if (!?key_OR_range && | 901 if (!?key_OR_range && !?direction) { |
| 910 !?direction) { | |
| 911 return _openCursor_1(); | 902 return _openCursor_1(); |
| 912 } | 903 } |
| 913 if ((key_OR_range is KeyRange || key_OR_range == null) && | 904 if ((key_OR_range is KeyRange || key_OR_range == null) && !?direction) { |
| 914 !?direction) { | |
| 915 return _openCursor_2(key_OR_range); | 905 return _openCursor_2(key_OR_range); |
| 916 } | 906 } |
| 917 if ((key_OR_range is KeyRange || key_OR_range == null)) { | 907 if ((key_OR_range is KeyRange || key_OR_range == null)) { |
| 918 return _openCursor_3(key_OR_range, direction); | 908 return _openCursor_3(key_OR_range, direction); |
| 919 } | 909 } |
| 920 if (?key_OR_range && | 910 if (?key_OR_range && !?direction) { |
| 921 !?direction) { | |
| 922 var key_1 = _convertDartToNative_IDBKey(key_OR_range); | 911 var key_1 = _convertDartToNative_IDBKey(key_OR_range); |
| 923 return _openCursor_4(key_1); | 912 return _openCursor_4(key_1); |
| 924 } | 913 } |
| 925 if (?key_OR_range) { | 914 if (?key_OR_range) { |
| 926 var key_2 = _convertDartToNative_IDBKey(key_OR_range); | 915 var key_2 = _convertDartToNative_IDBKey(key_OR_range); |
| 927 return _openCursor_5(key_2, direction); | 916 return _openCursor_5(key_2, direction); |
| 928 } | 917 } |
| 929 throw new ArgumentError("Incorrect number or type of arguments"); | 918 throw new ArgumentError("Incorrect number or type of arguments"); |
| 930 } | 919 } |
| 931 @JSName('openCursor') | 920 @JSName('openCursor') |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1270 } | 1259 } |
| 1271 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1260 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 1272 // for details. All rights reserved. Use of this source code is governed by a | 1261 // for details. All rights reserved. Use of this source code is governed by a |
| 1273 // BSD-style license that can be found in the LICENSE file. | 1262 // BSD-style license that can be found in the LICENSE file. |
| 1274 | 1263 |
| 1275 | 1264 |
| 1276 @DocsEditable | 1265 @DocsEditable |
| 1277 @DomName('IDBAny') | 1266 @DomName('IDBAny') |
| 1278 class _Any native "*IDBAny" { | 1267 class _Any native "*IDBAny" { |
| 1279 } | 1268 } |
| OLD | NEW |