| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of $LIBRARYNAME; | 5 part of $LIBRARYNAME; |
| 6 | 6 |
| 7 @DocsEditable() | 7 @DocsEditable() |
| 8 $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS
{ | 8 $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS
{ |
| 9 @DomName('IDBDatabase.createObjectStore') | 9 @DomName('IDBDatabase.createObjectStore') |
| 10 @DocsEditable() | 10 @DocsEditable() |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 Transaction _transaction(stores, mode) native; | 65 Transaction _transaction(stores, mode) native; |
| 66 $else | 66 $else |
| 67 Transaction transaction(storeName_OR_storeNames, String mode) { | 67 Transaction transaction(storeName_OR_storeNames, String mode) { |
| 68 if (mode != 'readonly' && mode != 'readwrite') { | 68 if (mode != 'readonly' && mode != 'readwrite') { |
| 69 throw new ArgumentError("Invalid transaction mode $mode"); | 69 throw new ArgumentError("Invalid transaction mode $mode"); |
| 70 } | 70 } |
| 71 var names; | 71 var names; |
| 72 if (storeName_OR_storeNames == null) { | 72 if (storeName_OR_storeNames == null) { |
| 73 throw new ArgumentError("stores may not be null in transaction"); | 73 throw new ArgumentError("stores may not be null in transaction"); |
| 74 } else if (storeName_OR_storeNames is String || storeName_OR_storeNames is D
omStringList) { | 74 } else if (storeName_OR_storeNames is String || storeName_OR_storeNames is D
omStringList) { |
| 75 names = unwrap_jso(storeName_OR_storeNames); | 75 names = storeName_OR_storeNames; |
| 76 } else if (storeName_OR_storeNames is List<String>) { | 76 } else if (storeName_OR_storeNames is List<String>) { |
| 77 names = convertDartToNative_List(storeName_OR_storeNames); | 77 names = convertDartToNative_List(storeName_OR_storeNames); |
| 78 } else { | 78 } else { |
| 79 throw new ArgumentError("Invalid store(s) $store_Name_OR_storeNames"); | 79 throw new ArgumentError("Invalid store(s) $store_Name_OR_storeNames"); |
| 80 } | 80 } |
| 81 | 81 |
| 82 return wrap_jso(_blink.BlinkIDBDatabase.instance.transaction_Callback_2_(unw
rap_jso(this), names, mode)); | 82 return _blink.BlinkIDBDatabase.instance.transaction_Callback_2_(this, names,
mode); |
| 83 } | 83 } |
| 84 | 84 |
| 85 Transaction transactionList(List<String> storeNames, String mode) => transacti
on(storeNames, mode); | 85 Transaction transactionList(List<String> storeNames, String mode) => transacti
on(storeNames, mode); |
| 86 Transaction transactionStores(List<String> storeNames, String mode) => transac
tion(storeNames, mode); | 86 Transaction transactionStores(List<String> storeNames, String mode) => transac
tion(storeNames, mode); |
| 87 Transaction transactionStore(String storeName, String mode) => transaction(sto
reName, mode); | 87 Transaction transactionStore(String storeName, String mode) => transaction(sto
reName, mode); |
| 88 $endif | 88 $endif |
| 89 | 89 |
| 90 $!MEMBERS} | 90 $!MEMBERS} |
| OLD | NEW |