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:typed_data'; | 6 import 'dart:typed_data'; |
7 import 'dart:_js_helper' show Creates, Returns, JSName, Null; | 7 import 'dart:_js_helper' show Creates, Returns, JSName, Null; |
8 import 'dart:_foreign_helper' show JS; | 8 import 'dart:_foreign_helper' show JS; |
9 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 9 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
10 // for details. All rights reserved. Use of this source code is governed by a | 10 // for details. All rights reserved. Use of this source code is governed by a |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 @DocsEditable | 295 @DocsEditable |
296 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native; | 296 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native; |
297 | 297 |
298 @DomName('IDBDatabase.close') | 298 @DomName('IDBDatabase.close') |
299 @DocsEditable | 299 @DocsEditable |
300 void close() native; | 300 void close() native; |
301 | 301 |
302 @DomName('IDBDatabase.createObjectStore') | 302 @DomName('IDBDatabase.createObjectStore') |
303 @DocsEditable | 303 @DocsEditable |
304 ObjectStore $dom_createObjectStore(String name, [Map options]) { | 304 ObjectStore $dom_createObjectStore(String name, [Map options]) { |
305 if (?options) { | 305 if (options != null) { |
306 var options_1 = convertDartToNative_Dictionary(options); | 306 var options_1 = convertDartToNative_Dictionary(options); |
307 return _$dom_createObjectStore_1(name, options_1); | 307 return _$dom_createObjectStore_1(name, options_1); |
308 } | 308 } |
309 return _$dom_createObjectStore_2(name); | 309 return _$dom_createObjectStore_2(name); |
310 } | 310 } |
311 @JSName('createObjectStore') | 311 @JSName('createObjectStore') |
312 @DomName('IDBDatabase.createObjectStore') | 312 @DomName('IDBDatabase.createObjectStore') |
313 @DocsEditable | 313 @DocsEditable |
314 ObjectStore _$dom_createObjectStore_1(name, options) native; | 314 ObjectStore _$dom_createObjectStore_1(name, options) native; |
315 @JSName('createObjectStore') | 315 @JSName('createObjectStore') |
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
857 @DomName('IDBObjectStore.transaction') | 857 @DomName('IDBObjectStore.transaction') |
858 @DocsEditable | 858 @DocsEditable |
859 final Transaction transaction; | 859 final Transaction transaction; |
860 | 860 |
861 @DomName('IDBObjectStore.add') | 861 @DomName('IDBObjectStore.add') |
862 @DocsEditable | 862 @DocsEditable |
863 @Returns('Request') | 863 @Returns('Request') |
864 @Creates('Request') | 864 @Creates('Request') |
865 @_annotation_Creates_IDBKey | 865 @_annotation_Creates_IDBKey |
866 Request $dom_add(/*any*/ value, [/*any*/ key]) { | 866 Request $dom_add(/*any*/ value, [/*any*/ key]) { |
867 if (?key) { | 867 if (key != null) { |
868 var value_1 = convertDartToNative_SerializedScriptValue(value); | 868 var value_1 = convertDartToNative_SerializedScriptValue(value); |
869 var key_2 = convertDartToNative_SerializedScriptValue(key); | 869 var key_2 = convertDartToNative_SerializedScriptValue(key); |
870 return _$dom_add_1(value_1, key_2); | 870 return _$dom_add_1(value_1, key_2); |
871 } | 871 } |
872 var value_3 = convertDartToNative_SerializedScriptValue(value); | 872 var value_3 = convertDartToNative_SerializedScriptValue(value); |
873 return _$dom_add_2(value_3); | 873 return _$dom_add_2(value_3); |
874 } | 874 } |
875 @JSName('add') | 875 @JSName('add') |
876 @DomName('IDBObjectStore.add') | 876 @DomName('IDBObjectStore.add') |
877 @DocsEditable | 877 @DocsEditable |
(...skipping 15 matching lines...) Expand all Loading... |
893 Request $dom_clear() native; | 893 Request $dom_clear() native; |
894 | 894 |
895 @JSName('count') | 895 @JSName('count') |
896 @DomName('IDBObjectStore.count') | 896 @DomName('IDBObjectStore.count') |
897 @DocsEditable | 897 @DocsEditable |
898 Request $dom_count([key_OR_range]) native; | 898 Request $dom_count([key_OR_range]) native; |
899 | 899 |
900 @DomName('IDBObjectStore.createIndex') | 900 @DomName('IDBObjectStore.createIndex') |
901 @DocsEditable | 901 @DocsEditable |
902 Index $dom_createIndex(String name, keyPath, [Map options]) { | 902 Index $dom_createIndex(String name, keyPath, [Map options]) { |
903 if ((keyPath is List<String> || keyPath == null) && !?options) { | 903 if ((keyPath is List<String> || keyPath == null) && options == null) { |
904 List keyPath_1 = convertDartToNative_StringArray(keyPath); | 904 List keyPath_1 = convertDartToNative_StringArray(keyPath); |
905 return _$dom_createIndex_1(name, keyPath_1); | 905 return _$dom_createIndex_1(name, keyPath_1); |
906 } | 906 } |
907 if ((keyPath is List<String> || keyPath == null)) { | 907 if ((keyPath is List<String> || keyPath == null)) { |
908 List keyPath_2 = convertDartToNative_StringArray(keyPath); | 908 List keyPath_2 = convertDartToNative_StringArray(keyPath); |
909 var options_3 = convertDartToNative_Dictionary(options); | 909 var options_3 = convertDartToNative_Dictionary(options); |
910 return _$dom_createIndex_2(name, keyPath_2, options_3); | 910 return _$dom_createIndex_2(name, keyPath_2, options_3); |
911 } | 911 } |
912 if ((keyPath is String || keyPath == null) && !?options) { | 912 if ((keyPath is String || keyPath == null) && options == null) { |
913 return _$dom_createIndex_3(name, keyPath); | 913 return _$dom_createIndex_3(name, keyPath); |
914 } | 914 } |
915 if ((keyPath is String || keyPath == null)) { | 915 if ((keyPath is String || keyPath == null)) { |
916 var options_4 = convertDartToNative_Dictionary(options); | 916 var options_4 = convertDartToNative_Dictionary(options); |
917 return _$dom_createIndex_4(name, keyPath, options_4); | 917 return _$dom_createIndex_4(name, keyPath, options_4); |
918 } | 918 } |
919 throw new ArgumentError("Incorrect number or type of arguments"); | 919 throw new ArgumentError("Incorrect number or type of arguments"); |
920 } | 920 } |
921 @JSName('createIndex') | 921 @JSName('createIndex') |
922 @DomName('IDBObjectStore.createIndex') | 922 @DomName('IDBObjectStore.createIndex') |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
963 @Creates('Request') | 963 @Creates('Request') |
964 @Creates('Cursor') | 964 @Creates('Cursor') |
965 Request $dom_openCursor([key_OR_range, String direction]) native; | 965 Request $dom_openCursor([key_OR_range, String direction]) native; |
966 | 966 |
967 @DomName('IDBObjectStore.put') | 967 @DomName('IDBObjectStore.put') |
968 @DocsEditable | 968 @DocsEditable |
969 @Returns('Request') | 969 @Returns('Request') |
970 @Creates('Request') | 970 @Creates('Request') |
971 @_annotation_Creates_IDBKey | 971 @_annotation_Creates_IDBKey |
972 Request $dom_put(/*any*/ value, [/*any*/ key]) { | 972 Request $dom_put(/*any*/ value, [/*any*/ key]) { |
973 if (?key) { | 973 if (key != null) { |
974 var value_1 = convertDartToNative_SerializedScriptValue(value); | 974 var value_1 = convertDartToNative_SerializedScriptValue(value); |
975 var key_2 = convertDartToNative_SerializedScriptValue(key); | 975 var key_2 = convertDartToNative_SerializedScriptValue(key); |
976 return _$dom_put_1(value_1, key_2); | 976 return _$dom_put_1(value_1, key_2); |
977 } | 977 } |
978 var value_3 = convertDartToNative_SerializedScriptValue(value); | 978 var value_3 = convertDartToNative_SerializedScriptValue(value); |
979 return _$dom_put_2(value_3); | 979 return _$dom_put_2(value_3); |
980 } | 980 } |
981 @JSName('put') | 981 @JSName('put') |
982 @DomName('IDBObjectStore.put') | 982 @DomName('IDBObjectStore.put') |
983 @DocsEditable | 983 @DocsEditable |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1239 } | 1239 } |
1240 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1240 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
1241 // for details. All rights reserved. Use of this source code is governed by a | 1241 // for details. All rights reserved. Use of this source code is governed by a |
1242 // BSD-style license that can be found in the LICENSE file. | 1242 // BSD-style license that can be found in the LICENSE file. |
1243 | 1243 |
1244 | 1244 |
1245 @DocsEditable | 1245 @DocsEditable |
1246 @DomName('IDBAny') | 1246 @DomName('IDBAny') |
1247 abstract class _IDBAny native "IDBAny" { | 1247 abstract class _IDBAny native "IDBAny" { |
1248 } | 1248 } |
OLD | NEW |