| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 | 52 |
| 53 @DomName('IDBCursor.value') | 53 @DomName('IDBCursor.value') |
| 54 Future update(value) { | 54 Future update(value) { |
| 55 try { | 55 try { |
| 56 return _completeRequest(_update(value)); | 56 return _completeRequest(_update(value)); |
| 57 } catch (e, stacktrace) { | 57 } catch (e, stacktrace) { |
| 58 return new Future.error(e, stacktrace); | 58 return new Future.error(e, stacktrace); |
| 59 } | 59 } |
| 60 } | 60 } |
| 61 | 61 |
| 62 | 62 // To suppress missing implicit constructor warnings. |
| 63 factory Cursor._() { throw new UnsupportedError("Not supported"); } |
| 64 |
| 63 @DomName('IDBCursor.direction') | 65 @DomName('IDBCursor.direction') |
| 64 @DocsEditable() | 66 @DocsEditable() |
| 65 String get direction native "IDBCursor_direction_Getter"; | 67 String get direction native "IDBCursor_direction_Getter"; |
| 66 | 68 |
| 67 @DomName('IDBCursor.key') | 69 @DomName('IDBCursor.key') |
| 68 @DocsEditable() | 70 @DocsEditable() |
| 69 Object get key native "IDBCursor_key_Getter"; | 71 Object get key native "IDBCursor_key_Getter"; |
| 70 | 72 |
| 71 @DomName('IDBCursor.primaryKey') | 73 @DomName('IDBCursor.primaryKey') |
| 72 @DocsEditable() | 74 @DocsEditable() |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 } | 334 } |
| 333 } | 335 } |
| 334 | 336 |
| 335 /** | 337 /** |
| 336 * Checks to see if getDatabaseNames is supported by the current platform. | 338 * Checks to see if getDatabaseNames is supported by the current platform. |
| 337 */ | 339 */ |
| 338 bool get supportsDatabaseNames { | 340 bool get supportsDatabaseNames { |
| 339 return true; | 341 return true; |
| 340 } | 342 } |
| 341 | 343 |
| 344 // To suppress missing implicit constructor warnings. |
| 345 factory IdbFactory._() { throw new UnsupportedError("Not supported"); } |
| 342 | 346 |
| 343 @DomName('IDBFactory.cmp') | 347 @DomName('IDBFactory.cmp') |
| 344 @DocsEditable() | 348 @DocsEditable() |
| 345 int cmp(Object first, Object second) native "IDBFactory_cmp_Callback"; | 349 int cmp(Object first, Object second) native "IDBFactory_cmp_Callback"; |
| 346 | 350 |
| 347 @DomName('IDBFactory.deleteDatabase') | 351 @DomName('IDBFactory.deleteDatabase') |
| 348 @DocsEditable() | 352 @DocsEditable() |
| 349 OpenDBRequest _deleteDatabase(String name) native "IDBFactory_deleteDatabase_C
allback"; | 353 OpenDBRequest _deleteDatabase(String name) native "IDBFactory_deleteDatabase_C
allback"; |
| 350 | 354 |
| 351 OpenDBRequest _open(String name, [int version]) { | 355 OpenDBRequest _open(String name, [int version]) { |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 } | 474 } |
| 471 var request; | 475 var request; |
| 472 if (direction == null) { | 476 if (direction == null) { |
| 473 request = _openKeyCursor(key_OR_range); | 477 request = _openKeyCursor(key_OR_range); |
| 474 } else { | 478 } else { |
| 475 request = _openKeyCursor(key_OR_range, direction); | 479 request = _openKeyCursor(key_OR_range, direction); |
| 476 } | 480 } |
| 477 return ObjectStore._cursorStreamFromResult(request, autoAdvance); | 481 return ObjectStore._cursorStreamFromResult(request, autoAdvance); |
| 478 } | 482 } |
| 479 | 483 |
| 480 | 484 // To suppress missing implicit constructor warnings. |
| 485 factory Index._() { throw new UnsupportedError("Not supported"); } |
| 486 |
| 481 @DomName('IDBIndex.keyPath') | 487 @DomName('IDBIndex.keyPath') |
| 482 @DocsEditable() | 488 @DocsEditable() |
| 483 dynamic get keyPath native "IDBIndex_keyPath_Getter"; | 489 dynamic get keyPath native "IDBIndex_keyPath_Getter"; |
| 484 | 490 |
| 485 @DomName('IDBIndex.multiEntry') | 491 @DomName('IDBIndex.multiEntry') |
| 486 @DocsEditable() | 492 @DocsEditable() |
| 487 bool get multiEntry native "IDBIndex_multiEntry_Getter"; | 493 bool get multiEntry native "IDBIndex_multiEntry_Getter"; |
| 488 | 494 |
| 489 @DomName('IDBIndex.name') | 495 @DomName('IDBIndex.name') |
| 490 @DocsEditable() | 496 @DocsEditable() |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 @DomName('IDBKeyRange.upperBound') | 544 @DomName('IDBKeyRange.upperBound') |
| 539 factory KeyRange.upperBound(/*Key*/ bound, [bool open = false]) => | 545 factory KeyRange.upperBound(/*Key*/ bound, [bool open = false]) => |
| 540 _KeyRangeFactoryProvider.createKeyRange_upperBound(bound, open); | 546 _KeyRangeFactoryProvider.createKeyRange_upperBound(bound, open); |
| 541 | 547 |
| 542 @DomName('KeyRange.bound') | 548 @DomName('KeyRange.bound') |
| 543 factory KeyRange.bound(/*Key*/ lower, /*Key*/ upper, | 549 factory KeyRange.bound(/*Key*/ lower, /*Key*/ upper, |
| 544 [bool lowerOpen = false, bool upperOpen = false]) => | 550 [bool lowerOpen = false, bool upperOpen = false]) => |
| 545 _KeyRangeFactoryProvider.createKeyRange_bound( | 551 _KeyRangeFactoryProvider.createKeyRange_bound( |
| 546 lower, upper, lowerOpen, upperOpen); | 552 lower, upper, lowerOpen, upperOpen); |
| 547 | 553 |
| 554 // To suppress missing implicit constructor warnings. |
| 555 factory KeyRange._() { throw new UnsupportedError("Not supported"); } |
| 548 | 556 |
| 549 @DomName('IDBKeyRange.lower') | 557 @DomName('IDBKeyRange.lower') |
| 550 @DocsEditable() | 558 @DocsEditable() |
| 551 Object get lower native "IDBKeyRange_lower_Getter"; | 559 Object get lower native "IDBKeyRange_lower_Getter"; |
| 552 | 560 |
| 553 @DomName('IDBKeyRange.lowerOpen') | 561 @DomName('IDBKeyRange.lowerOpen') |
| 554 @DocsEditable() | 562 @DocsEditable() |
| 555 bool get lowerOpen native "IDBKeyRange_lowerOpen_Getter"; | 563 bool get lowerOpen native "IDBKeyRange_lowerOpen_Getter"; |
| 556 | 564 |
| 557 @DomName('IDBKeyRange.upper') | 565 @DomName('IDBKeyRange.upper') |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 711 if (unique != null) { | 719 if (unique != null) { |
| 712 options['unique'] = unique; | 720 options['unique'] = unique; |
| 713 } | 721 } |
| 714 if (multiEntry != null) { | 722 if (multiEntry != null) { |
| 715 options['multiEntry'] = multiEntry; | 723 options['multiEntry'] = multiEntry; |
| 716 } | 724 } |
| 717 | 725 |
| 718 return _createIndex(name, keyPath, options); | 726 return _createIndex(name, keyPath, options); |
| 719 } | 727 } |
| 720 | 728 |
| 729 // To suppress missing implicit constructor warnings. |
| 730 factory ObjectStore._() { throw new UnsupportedError("Not supported"); } |
| 721 | 731 |
| 722 @DomName('IDBObjectStore.autoIncrement') | 732 @DomName('IDBObjectStore.autoIncrement') |
| 723 @DocsEditable() | 733 @DocsEditable() |
| 724 bool get autoIncrement native "IDBObjectStore_autoIncrement_Getter"; | 734 bool get autoIncrement native "IDBObjectStore_autoIncrement_Getter"; |
| 725 | 735 |
| 726 @DomName('IDBObjectStore.indexNames') | 736 @DomName('IDBObjectStore.indexNames') |
| 727 @DocsEditable() | 737 @DocsEditable() |
| 728 List<String> get indexNames native "IDBObjectStore_indexNames_Getter"; | 738 List<String> get indexNames native "IDBObjectStore_indexNames_Getter"; |
| 729 | 739 |
| 730 @DomName('IDBObjectStore.keyPath') | 740 @DomName('IDBObjectStore.keyPath') |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1037 // 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 |
| 1038 // BSD-style license that can be found in the LICENSE file. | 1048 // BSD-style license that can be found in the LICENSE file. |
| 1039 | 1049 |
| 1040 // WARNING: Do not edit - generated code. | 1050 // WARNING: Do not edit - generated code. |
| 1041 | 1051 |
| 1042 | 1052 |
| 1043 @DocsEditable() | 1053 @DocsEditable() |
| 1044 @DomName('IDBAny') | 1054 @DomName('IDBAny') |
| 1045 @deprecated // nonstandard | 1055 @deprecated // nonstandard |
| 1046 abstract class _IDBAny extends NativeFieldWrapperClass1 { | 1056 abstract class _IDBAny extends NativeFieldWrapperClass1 { |
| 1057 // To suppress missing implicit constructor warnings. |
| 1058 factory _IDBAny._() { throw new UnsupportedError("Not supported"); } |
| 1047 | 1059 |
| 1048 } | 1060 } |
| OLD | NEW |