| 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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 Map get single { | 335 Map get single { |
| 336 if (length == 1) return this[0]; | 336 if (length == 1) return this[0]; |
| 337 if (length == 0) throw new StateError("No elements"); | 337 if (length == 0) throw new StateError("No elements"); |
| 338 throw new StateError("More than one element"); | 338 throw new StateError("More than one element"); |
| 339 } | 339 } |
| 340 | 340 |
| 341 void insert(int index, Map element) { | 341 void insert(int index, Map element) { |
| 342 throw new UnsupportedError("Cannot add to immutable List."); | 342 throw new UnsupportedError("Cannot add to immutable List."); |
| 343 } | 343 } |
| 344 | 344 |
| 345 void insertAll(int index, Iterable<Map> iterable) { |
| 346 throw new UnsupportedError("Cannot add to immutable List."); |
| 347 } |
| 348 |
| 349 void setAll(int index, Iterable<Map> iterable) { |
| 350 throw new UnsupportedError("Cannot modify an immutable List."); |
| 351 } |
| 352 |
| 345 Map removeAt(int pos) { | 353 Map removeAt(int pos) { |
| 346 throw new UnsupportedError("Cannot remove from immutable List."); | 354 throw new UnsupportedError("Cannot remove from immutable List."); |
| 347 } | 355 } |
| 348 | 356 |
| 349 Map removeLast() { | 357 Map removeLast() { |
| 350 throw new UnsupportedError("Cannot remove from immutable List."); | 358 throw new UnsupportedError("Cannot remove from immutable List."); |
| 351 } | 359 } |
| 352 | 360 |
| 353 void remove(Object object) { | 361 void remove(Object object) { |
| 354 throw new UnsupportedError("Cannot remove from immutable List."); | 362 throw new UnsupportedError("Cannot remove from immutable List."); |
| 355 } | 363 } |
| 356 | 364 |
| 357 void removeWhere(bool test(Map element)) { | 365 void removeWhere(bool test(Map element)) { |
| 358 throw new UnsupportedError("Cannot remove from immutable List."); | 366 throw new UnsupportedError("Cannot remove from immutable List."); |
| 359 } | 367 } |
| 360 | 368 |
| 361 void retainWhere(bool test(Map element)) { | 369 void retainWhere(bool test(Map element)) { |
| 362 throw new UnsupportedError("Cannot remove from immutable List."); | 370 throw new UnsupportedError("Cannot remove from immutable List."); |
| 363 } | 371 } |
| 364 | 372 |
| 365 void setRange(int start, int end, Iterable<Map> iterable, [int skipCount]) { | 373 void setRange(int start, int end, Iterable<Map> iterable, [int skipCount]) { |
| 366 throw new UnsupportedError("Cannot setRange on immutable List."); | 374 throw new UnsupportedError("Cannot setRange on immutable List."); |
| 367 } | 375 } |
| 368 | 376 |
| 369 void removeRange(int start, int end) { | 377 void removeRange(int start, int end) { |
| 370 throw new UnsupportedError("Cannot removeRange on immutable List."); | 378 throw new UnsupportedError("Cannot removeRange on immutable List."); |
| 371 } | 379 } |
| 372 | 380 |
| 381 void replaceRange(int start, int end, Iterable<Map> iterable) { |
| 382 throw new UnsupportedError("Cannot modify an immutable List."); |
| 383 } |
| 384 |
| 385 void fillRange(int start, int end, [Map fillValue]) { |
| 386 throw new UnsupportedError("Cannot modify an immutable List."); |
| 387 } |
| 388 |
| 373 Iterable<Map> getRange(int start, int end) => | 389 Iterable<Map> getRange(int start, int end) => |
| 374 IterableMixinWorkaround.getRangeList(this, start, end); | 390 IterableMixinWorkaround.getRangeList(this, start, end); |
| 375 | 391 |
| 376 List<Map> sublist(int start, [int end]) { | 392 List<Map> sublist(int start, [int end]) { |
| 377 if (end == null) end = length; | 393 if (end == null) end = length; |
| 378 return Lists.getRange(this, start, end, <Map>[]); | 394 return Lists.getRange(this, start, end, <Map>[]); |
| 379 } | 395 } |
| 380 | 396 |
| 381 Map<int, Map> asMap() => | 397 Map<int, Map> asMap() => |
| 382 IterableMixinWorkaround.asMapList(this); | 398 IterableMixinWorkaround.asMapList(this); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 // BSD-style license that can be found in the LICENSE file. | 451 // BSD-style license that can be found in the LICENSE file. |
| 436 | 452 |
| 437 | 453 |
| 438 @DocsEditable | 454 @DocsEditable |
| 439 @DomName('SQLTransactionSync') | 455 @DomName('SQLTransactionSync') |
| 440 @SupportedBrowser(SupportedBrowser.CHROME) | 456 @SupportedBrowser(SupportedBrowser.CHROME) |
| 441 @SupportedBrowser(SupportedBrowser.SAFARI) | 457 @SupportedBrowser(SupportedBrowser.SAFARI) |
| 442 @Experimental | 458 @Experimental |
| 443 abstract class _SQLTransactionSync native "*SQLTransactionSync" { | 459 abstract class _SQLTransactionSync native "*SQLTransactionSync" { |
| 444 } | 460 } |
| OLD | NEW |