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:_js_helper' show Creates, Returns, JSName, Null; | 6 import 'dart:_js_helper' show Creates, Returns, JSName, Null; |
7 import 'dart:_foreign_helper' show JS; | 7 import 'dart:_foreign_helper' show JS; |
8 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 8 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
9 // for details. All rights reserved. Use of this source code is governed by a | 9 // for details. All rights reserved. Use of this source code is governed by a |
10 // BSD-style license that can be found in the LICENSE file. | 10 // BSD-style license that can be found in the LICENSE file. |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 final Object primaryKey; | 172 final Object primaryKey; |
173 | 173 |
174 @DomName('IDBCursor.source') | 174 @DomName('IDBCursor.source') |
175 @DocsEditable | 175 @DocsEditable |
176 final dynamic source; | 176 final dynamic source; |
177 | 177 |
178 @DomName('IDBCursor.advance') | 178 @DomName('IDBCursor.advance') |
179 @DocsEditable | 179 @DocsEditable |
180 void advance(int count) native; | 180 void advance(int count) native; |
181 | 181 |
| 182 @JSName('delete') |
| 183 @DomName('IDBCursor.delete') |
| 184 @DocsEditable |
| 185 Request $dom_delete() native; |
| 186 |
182 @JSName('continue') | 187 @JSName('continue') |
183 @DomName('IDBCursor.continue') | 188 @DomName('IDBCursor.continue') |
184 @DocsEditable | 189 @DocsEditable |
185 void next([Object key]) native; | 190 void next([Object key]) native; |
186 | 191 |
187 @JSName('delete') | |
188 @DomName('IDBCursor.delete') | |
189 @DocsEditable | |
190 Request $dom_delete() native; | |
191 | |
192 @DomName('IDBCursor.update') | 192 @DomName('IDBCursor.update') |
193 @DocsEditable | 193 @DocsEditable |
194 Request $dom_update(/*any*/ value) { | 194 Request $dom_update(/*any*/ value) { |
195 var value_1 = convertDartToNative_SerializedScriptValue(value); | 195 var value_1 = convertDartToNative_SerializedScriptValue(value); |
196 return _$dom_update_1(value_1); | 196 return _$dom_update_1(value_1); |
197 } | 197 } |
198 @JSName('update') | 198 @JSName('update') |
199 @DomName('IDBCursor.update') | 199 @DomName('IDBCursor.update') |
200 @DocsEditable | 200 @DocsEditable |
201 Request _$dom_update_1(value) native; | 201 Request _$dom_update_1(value) native; |
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
759 request = $dom_put(value, key); | 759 request = $dom_put(value, key); |
760 } else { | 760 } else { |
761 request = $dom_put(value); | 761 request = $dom_put(value); |
762 } | 762 } |
763 return _completeRequest(request); | 763 return _completeRequest(request); |
764 } catch (e, stacktrace) { | 764 } catch (e, stacktrace) { |
765 return new Future.immediateError(e, stacktrace); | 765 return new Future.immediateError(e, stacktrace); |
766 } | 766 } |
767 } | 767 } |
768 | 768 |
769 @DomName('IDBObjectStore.getObject') | 769 @DomName('IDBObjectStore.get') |
770 Future getObject(key) { | 770 Future getObject(key) { |
771 try { | 771 try { |
772 var request = $dom_getObject(key); | 772 var request = $dom_get(key); |
773 | 773 |
774 return _completeRequest(request); | 774 return _completeRequest(request); |
775 } catch (e, stacktrace) { | 775 } catch (e, stacktrace) { |
776 return new Future.immediateError(e, stacktrace); | 776 return new Future.immediateError(e, stacktrace); |
777 } | 777 } |
778 } | 778 } |
779 | 779 |
780 /** | 780 /** |
781 * Creates a stream of cursors over the records in this object store. | 781 * Creates a stream of cursors over the records in this object store. |
782 * | 782 * |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
942 @DomName('IDBObjectStore.deleteIndex') | 942 @DomName('IDBObjectStore.deleteIndex') |
943 @DocsEditable | 943 @DocsEditable |
944 void deleteIndex(String name) native; | 944 void deleteIndex(String name) native; |
945 | 945 |
946 @JSName('get') | 946 @JSName('get') |
947 @DomName('IDBObjectStore.get') | 947 @DomName('IDBObjectStore.get') |
948 @DocsEditable | 948 @DocsEditable |
949 @Returns('Request') | 949 @Returns('Request') |
950 @Creates('Request') | 950 @Creates('Request') |
951 @annotation_Creates_SerializedScriptValue | 951 @annotation_Creates_SerializedScriptValue |
952 Request $dom_getObject(key) native; | 952 Request $dom_get(key) native; |
953 | 953 |
954 @DomName('IDBObjectStore.index') | 954 @DomName('IDBObjectStore.index') |
955 @DocsEditable | 955 @DocsEditable |
956 Index index(String name) native; | 956 Index index(String name) native; |
957 | 957 |
958 @JSName('openCursor') | 958 @JSName('openCursor') |
959 @DomName('IDBObjectStore.openCursor') | 959 @DomName('IDBObjectStore.openCursor') |
960 @DocsEditable | 960 @DocsEditable |
961 @Returns('Request') | 961 @Returns('Request') |
962 @Creates('Request') | 962 @Creates('Request') |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1238 } | 1238 } |
1239 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1239 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
1240 // for details. All rights reserved. Use of this source code is governed by a | 1240 // for details. All rights reserved. Use of this source code is governed by a |
1241 // BSD-style license that can be found in the LICENSE file. | 1241 // BSD-style license that can be found in the LICENSE file. |
1242 | 1242 |
1243 | 1243 |
1244 @DocsEditable | 1244 @DocsEditable |
1245 @DomName('IDBAny') | 1245 @DomName('IDBAny') |
1246 class _IDBAny native "*IDBAny" { | 1246 class _IDBAny native "*IDBAny" { |
1247 } | 1247 } |
OLD | NEW |