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 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 } | 398 } |
399 | 399 |
400 void removeRange(int start, int rangeLength) { | 400 void removeRange(int start, int rangeLength) { |
401 throw new UnsupportedError("Cannot removeRange on immutable List."); | 401 throw new UnsupportedError("Cannot removeRange on immutable List."); |
402 } | 402 } |
403 | 403 |
404 void insertRange(int start, int rangeLength, [Map initialValue]) { | 404 void insertRange(int start, int rangeLength, [Map initialValue]) { |
405 throw new UnsupportedError("Cannot insertRange on immutable List."); | 405 throw new UnsupportedError("Cannot insertRange on immutable List."); |
406 } | 406 } |
407 | 407 |
| 408 Iterable<Map> getRange(int start, int end) => |
| 409 IterableMixinWorkaround.getRangeList(this, start, end); |
| 410 |
408 List<Map> sublist(int start, [int end]) { | 411 List<Map> sublist(int start, [int end]) { |
409 if (end == null) end = length; | 412 if (end == null) end = length; |
410 return Lists.getRange(this, start, end, <Map>[]); | 413 return Lists.getRange(this, start, end, <Map>[]); |
411 } | 414 } |
412 | 415 |
413 List<Map> getRange(int start, int rangeLength) => | |
414 sublist(start, start + rangeLength); | |
415 | |
416 Map<int, Map> asMap() => | 416 Map<int, Map> asMap() => |
417 IterableMixinWorkaround.asMapList(this); | 417 IterableMixinWorkaround.asMapList(this); |
418 | 418 |
419 String toString() { | 419 String toString() { |
420 StringBuffer buffer = new StringBuffer('['); | 420 StringBuffer buffer = new StringBuffer('['); |
421 buffer.writeAll(this, ', '); | 421 buffer.writeAll(this, ', '); |
422 buffer.write(']'); | 422 buffer.write(']'); |
423 return buffer.toString(); | 423 return buffer.toString(); |
424 } | 424 } |
425 | 425 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 | 475 |
476 @DocsEditable | 476 @DocsEditable |
477 @DomName('SQLTransactionSync') | 477 @DomName('SQLTransactionSync') |
478 @SupportedBrowser(SupportedBrowser.CHROME) | 478 @SupportedBrowser(SupportedBrowser.CHROME) |
479 @SupportedBrowser(SupportedBrowser.SAFARI) | 479 @SupportedBrowser(SupportedBrowser.SAFARI) |
480 @Experimental | 480 @Experimental |
481 abstract class _SQLTransactionSync extends NativeFieldWrapperClass1 { | 481 abstract class _SQLTransactionSync extends NativeFieldWrapperClass1 { |
482 _SQLTransactionSync.internal(); | 482 _SQLTransactionSync.internal(); |
483 | 483 |
484 } | 484 } |
OLD | NEW |