| OLD | NEW |
| 1 /** | 1 /** |
| 2 * An API for storing data in the browser that can be queried with SQL. | 2 * An API for storing data in the browser that can be queried with SQL. |
| 3 * | 3 * |
| 4 * **Caution:** this specification is no longer actively maintained by the Web | 4 * **Caution:** this specification is no longer actively maintained by the Web |
| 5 * Applications Working Group and may be removed at any time. | 5 * Applications Working Group and may be removed at any time. |
| 6 * See [the W3C Web SQL Database specification](http://www.w3.org/TR/webdatabase
/) | 6 * See [the W3C Web SQL Database specification](http://www.w3.org/TR/webdatabase
/) |
| 7 * for more information. | 7 * for more information. |
| 8 * | 8 * |
| 9 * The [dart:indexed_db] APIs is a recommended alternatives. | 9 * The [dart:indexed_db] APIs is a recommended alternatives. |
| 10 */ | 10 */ |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 | 234 |
| 235 // From Iterable<Map>: | 235 // From Iterable<Map>: |
| 236 | 236 |
| 237 Iterator<Map> get iterator { | 237 Iterator<Map> get iterator { |
| 238 // Note: NodeLists are not fixed size. And most probably length shouldn't | 238 // Note: NodeLists are not fixed size. And most probably length shouldn't |
| 239 // be cached in both iterator _and_ forEach method. For now caching it | 239 // be cached in both iterator _and_ forEach method. For now caching it |
| 240 // for consistency. | 240 // for consistency. |
| 241 return new FixedSizeListIterator<Map>(this); | 241 return new FixedSizeListIterator<Map>(this); |
| 242 } | 242 } |
| 243 | 243 |
| 244 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Map)) { | 244 Map reduce(Map combine(Map value, Map element)) { |
| 245 return IterableMixinWorkaround.reduce(this, initialValue, combine); | 245 return IterableMixinWorkaround.reduce(this, combine); |
| 246 } | 246 } |
| 247 | 247 |
| 248 dynamic fold(dynamic initialValue, dynamic combine(dynamic, Map)) { | 248 dynamic fold(dynamic initialValue, |
| 249 dynamic combine(dynamic previousValue, Map element)) { |
| 249 return IterableMixinWorkaround.fold(this, initialValue, combine); | 250 return IterableMixinWorkaround.fold(this, initialValue, combine); |
| 250 } | 251 } |
| 251 | 252 |
| 252 bool contains(Map element) => IterableMixinWorkaround.contains(this, element); | 253 bool contains(Map element) => IterableMixinWorkaround.contains(this, element); |
| 253 | 254 |
| 254 void forEach(void f(Map element)) => IterableMixinWorkaround.forEach(this, f); | 255 void forEach(void f(Map element)) => IterableMixinWorkaround.forEach(this, f); |
| 255 | 256 |
| 256 String join([String separator = ""]) => | 257 String join([String separator = ""]) => |
| 257 IterableMixinWorkaround.joinList(this, separator); | 258 IterableMixinWorkaround.joinList(this, separator); |
| 258 | 259 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 if (this.length > 0) return this[this.length - 1]; | 349 if (this.length > 0) return this[this.length - 1]; |
| 349 throw new StateError("No elements"); | 350 throw new StateError("No elements"); |
| 350 } | 351 } |
| 351 | 352 |
| 352 Map get single { | 353 Map get single { |
| 353 if (length == 1) return this[0]; | 354 if (length == 1) return this[0]; |
| 354 if (length == 0) throw new StateError("No elements"); | 355 if (length == 0) throw new StateError("No elements"); |
| 355 throw new StateError("More than one element"); | 356 throw new StateError("More than one element"); |
| 356 } | 357 } |
| 357 | 358 |
| 358 Map min([int compare(Map a, Map b)]) => | |
| 359 IterableMixinWorkaround.min(this, compare); | |
| 360 | |
| 361 Map max([int compare(Map a, Map b)]) => | |
| 362 IterableMixinWorkaround.max(this, compare); | |
| 363 | |
| 364 void insert(int index, Map element) { | 359 void insert(int index, Map element) { |
| 365 throw new UnsupportedError("Cannot add to immutable List."); | 360 throw new UnsupportedError("Cannot add to immutable List."); |
| 366 } | 361 } |
| 367 | 362 |
| 368 Map removeAt(int pos) { | 363 Map removeAt(int pos) { |
| 369 throw new UnsupportedError("Cannot remove from immutable List."); | 364 throw new UnsupportedError("Cannot remove from immutable List."); |
| 370 } | 365 } |
| 371 | 366 |
| 372 Map removeLast() { | 367 Map removeLast() { |
| 373 throw new UnsupportedError("Cannot remove from immutable List."); | 368 throw new UnsupportedError("Cannot remove from immutable List."); |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 | 470 |
| 476 @DocsEditable | 471 @DocsEditable |
| 477 @DomName('SQLTransactionSync') | 472 @DomName('SQLTransactionSync') |
| 478 @SupportedBrowser(SupportedBrowser.CHROME) | 473 @SupportedBrowser(SupportedBrowser.CHROME) |
| 479 @SupportedBrowser(SupportedBrowser.SAFARI) | 474 @SupportedBrowser(SupportedBrowser.SAFARI) |
| 480 @Experimental | 475 @Experimental |
| 481 abstract class _SQLTransactionSync extends NativeFieldWrapperClass1 { | 476 abstract class _SQLTransactionSync extends NativeFieldWrapperClass1 { |
| 482 _SQLTransactionSync.internal(); | 477 _SQLTransactionSync.internal(); |
| 483 | 478 |
| 484 } | 479 } |
| OLD | NEW |