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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 @DocsEditable | 298 @DocsEditable |
299 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native; | 299 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native; |
300 | 300 |
301 @DomName('IDBDatabase.close') | 301 @DomName('IDBDatabase.close') |
302 @DocsEditable | 302 @DocsEditable |
303 void close() native; | 303 void close() native; |
304 | 304 |
305 @DomName('IDBDatabase.createObjectStore') | 305 @DomName('IDBDatabase.createObjectStore') |
306 @DocsEditable | 306 @DocsEditable |
307 ObjectStore $dom_createObjectStore(String name, [Map options]) { | 307 ObjectStore $dom_createObjectStore(String name, [Map options]) { |
308 if (?options) { | 308 if (options != null) { |
309 var options_1 = convertDartToNative_Dictionary(options); | 309 var options_1 = convertDartToNative_Dictionary(options); |
310 return _$dom_createObjectStore_1(name, options_1); | 310 return _$dom_createObjectStore_1(name, options_1); |
311 } | 311 } |
312 return _$dom_createObjectStore_2(name); | 312 return _$dom_createObjectStore_2(name); |
313 } | 313 } |
314 @JSName('createObjectStore') | 314 @JSName('createObjectStore') |
315 @DomName('IDBDatabase.createObjectStore') | 315 @DomName('IDBDatabase.createObjectStore') |
316 @DocsEditable | 316 @DocsEditable |
317 ObjectStore _$dom_createObjectStore_1(name, options) native; | 317 ObjectStore _$dom_createObjectStore_1(name, options) native; |
318 @JSName('createObjectStore') | 318 @JSName('createObjectStore') |
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
864 @DomName('IDBObjectStore.transaction') | 864 @DomName('IDBObjectStore.transaction') |
865 @DocsEditable | 865 @DocsEditable |
866 final Transaction transaction; | 866 final Transaction transaction; |
867 | 867 |
868 @DomName('IDBObjectStore.add') | 868 @DomName('IDBObjectStore.add') |
869 @DocsEditable | 869 @DocsEditable |
870 @Returns('Request') | 870 @Returns('Request') |
871 @Creates('Request') | 871 @Creates('Request') |
872 @_annotation_Creates_IDBKey | 872 @_annotation_Creates_IDBKey |
873 Request $dom_add(/*any*/ value, [/*any*/ key]) { | 873 Request $dom_add(/*any*/ value, [/*any*/ key]) { |
874 if (?key) { | 874 if (key != null) { |
875 var value_1 = convertDartToNative_SerializedScriptValue(value); | 875 var value_1 = convertDartToNative_SerializedScriptValue(value); |
876 var key_2 = convertDartToNative_SerializedScriptValue(key); | 876 var key_2 = convertDartToNative_SerializedScriptValue(key); |
877 return _$dom_add_1(value_1, key_2); | 877 return _$dom_add_1(value_1, key_2); |
878 } | 878 } |
879 var value_3 = convertDartToNative_SerializedScriptValue(value); | 879 var value_3 = convertDartToNative_SerializedScriptValue(value); |
880 return _$dom_add_2(value_3); | 880 return _$dom_add_2(value_3); |
881 } | 881 } |
882 @JSName('add') | 882 @JSName('add') |
883 @DomName('IDBObjectStore.add') | 883 @DomName('IDBObjectStore.add') |
884 @DocsEditable | 884 @DocsEditable |
(...skipping 15 matching lines...) Expand all Loading... |
900 Request $dom_clear() native; | 900 Request $dom_clear() native; |
901 | 901 |
902 @JSName('count') | 902 @JSName('count') |
903 @DomName('IDBObjectStore.count') | 903 @DomName('IDBObjectStore.count') |
904 @DocsEditable | 904 @DocsEditable |
905 Request $dom_count([key_OR_range]) native; | 905 Request $dom_count([key_OR_range]) native; |
906 | 906 |
907 @DomName('IDBObjectStore.createIndex') | 907 @DomName('IDBObjectStore.createIndex') |
908 @DocsEditable | 908 @DocsEditable |
909 Index $dom_createIndex(String name, keyPath, [Map options]) { | 909 Index $dom_createIndex(String name, keyPath, [Map options]) { |
910 if ((keyPath is List<String> || keyPath == null) && !?options) { | 910 if ((keyPath is List<String> || keyPath == null) && options == null) { |
911 List keyPath_1 = convertDartToNative_StringArray(keyPath); | 911 List keyPath_1 = convertDartToNative_StringArray(keyPath); |
912 return _$dom_createIndex_1(name, keyPath_1); | 912 return _$dom_createIndex_1(name, keyPath_1); |
913 } | 913 } |
914 if ((keyPath is List<String> || keyPath == null) && ?options) { | 914 if (options != null && (keyPath is List<String> || keyPath == null)) { |
915 List keyPath_2 = convertDartToNative_StringArray(keyPath); | 915 List keyPath_2 = convertDartToNative_StringArray(keyPath); |
916 var options_3 = convertDartToNative_Dictionary(options); | 916 var options_3 = convertDartToNative_Dictionary(options); |
917 return _$dom_createIndex_2(name, keyPath_2, options_3); | 917 return _$dom_createIndex_2(name, keyPath_2, options_3); |
918 } | 918 } |
919 if ((keyPath is String || keyPath == null) && !?options) { | 919 if ((keyPath is String || keyPath == null) && options == null) { |
920 return _$dom_createIndex_3(name, keyPath); | 920 return _$dom_createIndex_3(name, keyPath); |
921 } | 921 } |
922 if ((keyPath is String || keyPath == null) && ?options) { | 922 if (options != null && (keyPath is String || keyPath == null)) { |
923 var options_4 = convertDartToNative_Dictionary(options); | 923 var options_4 = convertDartToNative_Dictionary(options); |
924 return _$dom_createIndex_4(name, keyPath, options_4); | 924 return _$dom_createIndex_4(name, keyPath, options_4); |
925 } | 925 } |
926 throw new ArgumentError("Incorrect number or type of arguments"); | 926 throw new ArgumentError("Incorrect number or type of arguments"); |
927 } | 927 } |
928 @JSName('createIndex') | 928 @JSName('createIndex') |
929 @DomName('IDBObjectStore.createIndex') | 929 @DomName('IDBObjectStore.createIndex') |
930 @DocsEditable | 930 @DocsEditable |
931 Index _$dom_createIndex_1(name, List keyPath) native; | 931 Index _$dom_createIndex_1(name, List keyPath) native; |
932 @JSName('createIndex') | 932 @JSName('createIndex') |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
970 @Creates('Request') | 970 @Creates('Request') |
971 @Creates('Cursor') | 971 @Creates('Cursor') |
972 Request $dom_openCursor([key_OR_range, String direction]) native; | 972 Request $dom_openCursor([key_OR_range, String direction]) native; |
973 | 973 |
974 @DomName('IDBObjectStore.put') | 974 @DomName('IDBObjectStore.put') |
975 @DocsEditable | 975 @DocsEditable |
976 @Returns('Request') | 976 @Returns('Request') |
977 @Creates('Request') | 977 @Creates('Request') |
978 @_annotation_Creates_IDBKey | 978 @_annotation_Creates_IDBKey |
979 Request $dom_put(/*any*/ value, [/*any*/ key]) { | 979 Request $dom_put(/*any*/ value, [/*any*/ key]) { |
980 if (?key) { | 980 if (key != null) { |
981 var value_1 = convertDartToNative_SerializedScriptValue(value); | 981 var value_1 = convertDartToNative_SerializedScriptValue(value); |
982 var key_2 = convertDartToNative_SerializedScriptValue(key); | 982 var key_2 = convertDartToNative_SerializedScriptValue(key); |
983 return _$dom_put_1(value_1, key_2); | 983 return _$dom_put_1(value_1, key_2); |
984 } | 984 } |
985 var value_3 = convertDartToNative_SerializedScriptValue(value); | 985 var value_3 = convertDartToNative_SerializedScriptValue(value); |
986 return _$dom_put_2(value_3); | 986 return _$dom_put_2(value_3); |
987 } | 987 } |
988 @JSName('put') | 988 @JSName('put') |
989 @DomName('IDBObjectStore.put') | 989 @DomName('IDBObjectStore.put') |
990 @DocsEditable | 990 @DocsEditable |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1251 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1251 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
1252 // for details. All rights reserved. Use of this source code is governed by a | 1252 // for details. All rights reserved. Use of this source code is governed by a |
1253 // BSD-style license that can be found in the LICENSE file. | 1253 // BSD-style license that can be found in the LICENSE file. |
1254 | 1254 |
1255 | 1255 |
1256 @DocsEditable | 1256 @DocsEditable |
1257 @DomName('IDBAny') | 1257 @DomName('IDBAny') |
1258 @deprecated // nonstandard | 1258 @deprecated // nonstandard |
1259 abstract class _IDBAny native "IDBAny" { | 1259 abstract class _IDBAny native "IDBAny" { |
1260 } | 1260 } |
OLD | NEW |