| 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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 203 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 204 // for details. All rights reserved. Use of this source code is governed by a | 204 // for details. All rights reserved. Use of this source code is governed by a |
| 205 // BSD-style license that can be found in the LICENSE file. | 205 // BSD-style license that can be found in the LICENSE file. |
| 206 | 206 |
| 207 | 207 |
| 208 @DocsEditable() | 208 @DocsEditable() |
| 209 @DomName('SQLResultSetRowList') | 209 @DomName('SQLResultSetRowList') |
| 210 // http://www.w3.org/TR/webdatabase/#sqlresultsetrowlist | 210 // http://www.w3.org/TR/webdatabase/#sqlresultsetrowlist |
| 211 @Experimental() // deprecated | 211 @Experimental() // deprecated |
| 212 @Native("SQLResultSetRowList") | 212 @Native("SQLResultSetRowList") |
| 213 class SqlResultSetRowList extends Interceptor with ListMixin<Map>, ImmutableList
Mixin<Map> implements JavaScriptIndexingBehavior, List<Map> { | 213 class SqlResultSetRowList extends Interceptor with ListMixin<Map>, ImmutableList
Mixin<Map> implements List<Map> { |
| 214 // To suppress missing implicit constructor warnings. | 214 // To suppress missing implicit constructor warnings. |
| 215 factory SqlResultSetRowList._() { throw new UnsupportedError("Not supported");
} | 215 factory SqlResultSetRowList._() { throw new UnsupportedError("Not supported");
} |
| 216 | 216 |
| 217 @DomName('SQLResultSetRowList.length') | 217 @DomName('SQLResultSetRowList.length') |
| 218 @DocsEditable() | 218 @DocsEditable() |
| 219 int get length => JS("int", "#.length", this); | 219 int get length => JS("int", "#.length", this); |
| 220 | 220 |
| 221 Map operator[](int index) { | 221 Map operator[](int index) { |
| 222 if (JS("bool", "# >>> 0 !== # || # >= #", index, | 222 if (JS("bool", "# >>> 0 !== # || # >= #", index, |
| 223 index, index, length)) | 223 index, index, length)) |
| 224 throw new RangeError.index(index, this); | 224 throw new RangeError.index(index, this); |
| 225 return JS("Map", "#[#]", this, index); | 225 return this.item(index); |
| 226 } | 226 } |
| 227 void operator[]=(int index, Map value) { | 227 void operator[]=(int index, Map value) { |
| 228 throw new UnsupportedError("Cannot assign element of immutable List."); | 228 throw new UnsupportedError("Cannot assign element of immutable List."); |
| 229 } | 229 } |
| 230 // -- start List<Map> mixins. | 230 // -- start List<Map> mixins. |
| 231 // Map is the element type. | 231 // Map is the element type. |
| 232 | 232 |
| 233 | 233 |
| 234 set length(int value) { | 234 set length(int value) { |
| 235 throw new UnsupportedError("Cannot resize immutable List."); | 235 throw new UnsupportedError("Cannot resize immutable List."); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 257 } | 257 } |
| 258 if (len == 0) throw new StateError("No elements"); | 258 if (len == 0) throw new StateError("No elements"); |
| 259 throw new StateError("More than one element"); | 259 throw new StateError("More than one element"); |
| 260 } | 260 } |
| 261 | 261 |
| 262 Map elementAt(int index) => this[index]; | 262 Map elementAt(int index) => this[index]; |
| 263 // -- end List<Map> mixins. | 263 // -- end List<Map> mixins. |
| 264 | 264 |
| 265 @DomName('SQLResultSetRowList.item') | 265 @DomName('SQLResultSetRowList.item') |
| 266 @DocsEditable() | 266 @DocsEditable() |
| 267 @Creates('=Object') | 267 Map item(int index) { |
| 268 Object item(int index) native; | 268 return convertNativeToDart_Dictionary(_item_1(index)); |
| 269 } |
| 270 @JSName('item') |
| 271 @DomName('SQLResultSetRowList.item') |
| 272 @DocsEditable() |
| 273 _item_1(index) native; |
| 269 } | 274 } |
| 270 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 275 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 271 // for details. All rights reserved. Use of this source code is governed by a | 276 // for details. All rights reserved. Use of this source code is governed by a |
| 272 // BSD-style license that can be found in the LICENSE file. | 277 // BSD-style license that can be found in the LICENSE file. |
| 273 | 278 |
| 274 | 279 |
| 275 @DocsEditable() | 280 @DocsEditable() |
| 276 @DomName('SQLTransaction') | 281 @DomName('SQLTransaction') |
| 277 @SupportedBrowser(SupportedBrowser.CHROME) | 282 @SupportedBrowser(SupportedBrowser.CHROME) |
| 278 @SupportedBrowser(SupportedBrowser.SAFARI) | 283 @SupportedBrowser(SupportedBrowser.SAFARI) |
| 279 @Experimental() | 284 @Experimental() |
| 280 // http://www.w3.org/TR/webdatabase/#sqltransaction | 285 // http://www.w3.org/TR/webdatabase/#sqltransaction |
| 281 @deprecated // deprecated | 286 @deprecated // deprecated |
| 282 @Native("SQLTransaction") | 287 @Native("SQLTransaction") |
| 283 class SqlTransaction extends Interceptor { | 288 class SqlTransaction extends Interceptor { |
| 284 // To suppress missing implicit constructor warnings. | 289 // To suppress missing implicit constructor warnings. |
| 285 factory SqlTransaction._() { throw new UnsupportedError("Not supported"); } | 290 factory SqlTransaction._() { throw new UnsupportedError("Not supported"); } |
| 286 | 291 |
| 287 @DomName('SQLTransaction.executeSql') | 292 @DomName('SQLTransaction.executeSql') |
| 288 @DocsEditable() | 293 @DocsEditable() |
| 289 void executeSql(String sqlStatement, [List arguments, SqlStatementCallback cal
lback, SqlStatementErrorCallback errorCallback]) native; | 294 void executeSql(String sqlStatement, [List arguments, SqlStatementCallback cal
lback, SqlStatementErrorCallback errorCallback]) native; |
| 290 } | 295 } |
| OLD | NEW |