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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 } | 438 } |
439 | 439 |
440 void removeRange(int start, int rangeLength) { | 440 void removeRange(int start, int rangeLength) { |
441 throw new UnsupportedError("Cannot removeRange on immutable List."); | 441 throw new UnsupportedError("Cannot removeRange on immutable List."); |
442 } | 442 } |
443 | 443 |
444 void insertRange(int start, int rangeLength, [Map initialValue]) { | 444 void insertRange(int start, int rangeLength, [Map initialValue]) { |
445 throw new UnsupportedError("Cannot insertRange on immutable List."); | 445 throw new UnsupportedError("Cannot insertRange on immutable List."); |
446 } | 446 } |
447 | 447 |
| 448 List<Map> sublist(int start, [int end]) { |
| 449 if (end == null) end = length; |
| 450 return Lists.getRange(this, start, end, <Map>[]); |
| 451 } |
| 452 |
448 List<Map> getRange(int start, int rangeLength) => | 453 List<Map> getRange(int start, int rangeLength) => |
449 Lists.getRange(this, start, rangeLength, <Map>[]); | 454 sublist(start, start + rangeLength); |
450 | 455 |
451 Map<int, Map> asMap() => | 456 Map<int, Map> asMap() => |
452 IterableMixinWorkaround.asMapList(this); | 457 IterableMixinWorkaround.asMapList(this); |
453 | 458 |
454 // -- end List<Map> mixins. | 459 // -- end List<Map> mixins. |
455 | 460 |
456 @DomName('SQLResultSetRowList.item') | 461 @DomName('SQLResultSetRowList.item') |
457 @DocsEditable | 462 @DocsEditable |
458 Map item(int index) native "SQLResultSetRowList_item_Callback"; | 463 Map item(int index) native "SQLResultSetRowList_item_Callback"; |
459 | 464 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
491 @SupportedBrowser(SupportedBrowser.SAFARI) | 496 @SupportedBrowser(SupportedBrowser.SAFARI) |
492 @Experimental | 497 @Experimental |
493 class SqlTransactionSync extends NativeFieldWrapperClass1 { | 498 class SqlTransactionSync extends NativeFieldWrapperClass1 { |
494 SqlTransactionSync.internal(); | 499 SqlTransactionSync.internal(); |
495 | 500 |
496 @DomName('SQLTransactionSync.executeSql') | 501 @DomName('SQLTransactionSync.executeSql') |
497 @DocsEditable | 502 @DocsEditable |
498 SqlResultSet executeSql(String sqlStatement, List arguments) native "SQLTransa
ctionSync_executeSql_Callback"; | 503 SqlResultSet executeSql(String sqlStatement, List arguments) native "SQLTransa
ctionSync_executeSql_Callback"; |
499 | 504 |
500 } | 505 } |
OLD | NEW |