| 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:nativewrappers'; | 6 import 'dart:nativewrappers'; |
| 7 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 7 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 8 // for details. All rights reserved. Use of this source code is governed by a | 8 // for details. All rights reserved. Use of this source code is governed by a |
| 9 // BSD-style license that can be found in the LICENSE file. | 9 // BSD-style license that can be found in the LICENSE file. |
| 10 | 10 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 [bool lowerOpen = false, bool upperOpen = false]) => | 33 [bool lowerOpen = false, bool upperOpen = false]) => |
| 34 KeyRange.bound_(lower, upper, lowerOpen, upperOpen); | 34 KeyRange.bound_(lower, upper, lowerOpen, upperOpen); |
| 35 } | 35 } |
| 36 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 36 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 37 // for details. All rights reserved. Use of this source code is governed by a | 37 // for details. All rights reserved. Use of this source code is governed by a |
| 38 // BSD-style license that can be found in the LICENSE file. | 38 // BSD-style license that can be found in the LICENSE file. |
| 39 | 39 |
| 40 | 40 |
| 41 @DomName('IDBCursor') | 41 @DomName('IDBCursor') |
| 42 @Unstable() | 42 @Unstable() |
| 43 class Cursor extends NativeFieldWrapperClass1 { | 43 class Cursor extends NativeFieldWrapperClass2 { |
| 44 @DomName('IDBCursor.delete') | 44 @DomName('IDBCursor.delete') |
| 45 Future delete() { | 45 Future delete() { |
| 46 try { | 46 try { |
| 47 return _completeRequest(_delete()); | 47 return _completeRequest(_delete()); |
| 48 } catch (e, stacktrace) { | 48 } catch (e, stacktrace) { |
| 49 return new Future.error(e, stacktrace); | 49 return new Future.error(e, stacktrace); |
| 50 } | 50 } |
| 51 } | 51 } |
| 52 | 52 |
| 53 @DomName('IDBCursor.value') | 53 @DomName('IDBCursor.value') |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 // for details. All rights reserved. Use of this source code is governed by a | 258 // for details. All rights reserved. Use of this source code is governed by a |
| 259 // BSD-style license that can be found in the LICENSE file. | 259 // BSD-style license that can be found in the LICENSE file. |
| 260 | 260 |
| 261 | 261 |
| 262 @DomName('IDBFactory') | 262 @DomName('IDBFactory') |
| 263 @SupportedBrowser(SupportedBrowser.CHROME) | 263 @SupportedBrowser(SupportedBrowser.CHROME) |
| 264 @SupportedBrowser(SupportedBrowser.FIREFOX, '15') | 264 @SupportedBrowser(SupportedBrowser.FIREFOX, '15') |
| 265 @SupportedBrowser(SupportedBrowser.IE, '10') | 265 @SupportedBrowser(SupportedBrowser.IE, '10') |
| 266 @Experimental() | 266 @Experimental() |
| 267 @Unstable() | 267 @Unstable() |
| 268 class IdbFactory extends NativeFieldWrapperClass1 { | 268 class IdbFactory extends NativeFieldWrapperClass2 { |
| 269 /** | 269 /** |
| 270 * Checks to see if Indexed DB is supported on the current platform. | 270 * Checks to see if Indexed DB is supported on the current platform. |
| 271 */ | 271 */ |
| 272 static bool get supported { | 272 static bool get supported { |
| 273 return true; | 273 return true; |
| 274 } | 274 } |
| 275 | 275 |
| 276 @DomName('IDBFactory.open') | 276 @DomName('IDBFactory.open') |
| 277 Future<Database> open(String name, | 277 Future<Database> open(String name, |
| 278 {int version, void onUpgradeNeeded(VersionChangeEvent), | 278 {int version, void onUpgradeNeeded(VersionChangeEvent), |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 request.onError.listen(completer.completeError); | 387 request.onError.listen(completer.completeError); |
| 388 return completer.future; | 388 return completer.future; |
| 389 } | 389 } |
| 390 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 390 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 391 // for details. All rights reserved. Use of this source code is governed by a | 391 // for details. All rights reserved. Use of this source code is governed by a |
| 392 // BSD-style license that can be found in the LICENSE file. | 392 // BSD-style license that can be found in the LICENSE file. |
| 393 | 393 |
| 394 | 394 |
| 395 @DomName('IDBIndex') | 395 @DomName('IDBIndex') |
| 396 @Unstable() | 396 @Unstable() |
| 397 class Index extends NativeFieldWrapperClass1 { | 397 class Index extends NativeFieldWrapperClass2 { |
| 398 @DomName('IDBIndex.count') | 398 @DomName('IDBIndex.count') |
| 399 Future<int> count([key_OR_range]) { | 399 Future<int> count([key_OR_range]) { |
| 400 try { | 400 try { |
| 401 var request = _count(key_OR_range); | 401 var request = _count(key_OR_range); |
| 402 return _completeRequest(request); | 402 return _completeRequest(request); |
| 403 } catch (e, stacktrace) { | 403 } catch (e, stacktrace) { |
| 404 return new Future.error(e, stacktrace); | 404 return new Future.error(e, stacktrace); |
| 405 } | 405 } |
| 406 } | 406 } |
| 407 | 407 |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 Request _openKeyCursor(Object key, [String direction]) native "IDBIndex_openKe
yCursor_Callback"; | 525 Request _openKeyCursor(Object key, [String direction]) native "IDBIndex_openKe
yCursor_Callback"; |
| 526 | 526 |
| 527 } | 527 } |
| 528 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 528 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 529 // for details. All rights reserved. Use of this source code is governed by a | 529 // for details. All rights reserved. Use of this source code is governed by a |
| 530 // BSD-style license that can be found in the LICENSE file. | 530 // BSD-style license that can be found in the LICENSE file. |
| 531 | 531 |
| 532 | 532 |
| 533 @DomName('IDBKeyRange') | 533 @DomName('IDBKeyRange') |
| 534 @Unstable() | 534 @Unstable() |
| 535 class KeyRange extends NativeFieldWrapperClass1 { | 535 class KeyRange extends NativeFieldWrapperClass2 { |
| 536 @DomName('IDBKeyRange.only') | 536 @DomName('IDBKeyRange.only') |
| 537 factory KeyRange.only(/*Key*/ value) => | 537 factory KeyRange.only(/*Key*/ value) => |
| 538 _KeyRangeFactoryProvider.createKeyRange_only(value); | 538 _KeyRangeFactoryProvider.createKeyRange_only(value); |
| 539 | 539 |
| 540 @DomName('IDBKeyRange.lowerBound') | 540 @DomName('IDBKeyRange.lowerBound') |
| 541 factory KeyRange.lowerBound(/*Key*/ bound, [bool open = false]) => | 541 factory KeyRange.lowerBound(/*Key*/ bound, [bool open = false]) => |
| 542 _KeyRangeFactoryProvider.createKeyRange_lowerBound(bound, open); | 542 _KeyRangeFactoryProvider.createKeyRange_lowerBound(bound, open); |
| 543 | 543 |
| 544 @DomName('IDBKeyRange.upperBound') | 544 @DomName('IDBKeyRange.upperBound') |
| 545 factory KeyRange.upperBound(/*Key*/ bound, [bool open = false]) => | 545 factory KeyRange.upperBound(/*Key*/ bound, [bool open = false]) => |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 591 static KeyRange upperBound_(Object bound, [bool open]) native "IDBKeyRange_upp
erBound__Callback"; | 591 static KeyRange upperBound_(Object bound, [bool open]) native "IDBKeyRange_upp
erBound__Callback"; |
| 592 | 592 |
| 593 } | 593 } |
| 594 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 594 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 595 // for details. All rights reserved. Use of this source code is governed by a | 595 // for details. All rights reserved. Use of this source code is governed by a |
| 596 // BSD-style license that can be found in the LICENSE file. | 596 // BSD-style license that can be found in the LICENSE file. |
| 597 | 597 |
| 598 | 598 |
| 599 @DomName('IDBObjectStore') | 599 @DomName('IDBObjectStore') |
| 600 @Unstable() | 600 @Unstable() |
| 601 class ObjectStore extends NativeFieldWrapperClass1 { | 601 class ObjectStore extends NativeFieldWrapperClass2 { |
| 602 | 602 |
| 603 @DomName('IDBObjectStore.add') | 603 @DomName('IDBObjectStore.add') |
| 604 Future add(value, [key]) { | 604 Future add(value, [key]) { |
| 605 try { | 605 try { |
| 606 var request; | 606 var request; |
| 607 if (key != null) { | 607 if (key != null) { |
| 608 request = _add(value, key); | 608 request = _add(value, key); |
| 609 } else { | 609 } else { |
| 610 request = _add(value); | 610 request = _add(value); |
| 611 } | 611 } |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1046 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1046 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 1047 // for details. All rights reserved. Use of this source code is governed by a | 1047 // for details. All rights reserved. Use of this source code is governed by a |
| 1048 // BSD-style license that can be found in the LICENSE file. | 1048 // BSD-style license that can be found in the LICENSE file. |
| 1049 | 1049 |
| 1050 // WARNING: Do not edit - generated code. | 1050 // WARNING: Do not edit - generated code. |
| 1051 | 1051 |
| 1052 | 1052 |
| 1053 @DocsEditable() | 1053 @DocsEditable() |
| 1054 @DomName('IDBAny') | 1054 @DomName('IDBAny') |
| 1055 @deprecated // nonstandard | 1055 @deprecated // nonstandard |
| 1056 abstract class _IDBAny extends NativeFieldWrapperClass1 { | 1056 abstract class _IDBAny extends NativeFieldWrapperClass2 { |
| 1057 // To suppress missing implicit constructor warnings. | 1057 // To suppress missing implicit constructor warnings. |
| 1058 factory _IDBAny._() { throw new UnsupportedError("Not supported"); } | 1058 factory _IDBAny._() { throw new UnsupportedError("Not supported"); } |
| 1059 | 1059 |
| 1060 } | 1060 } |
| OLD | NEW |