| 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 */ |
| 11 library dart.dom.web_sql; | 11 library dart.dom.web_sql; |
| 12 | 12 |
| 13 import 'dart:async'; | 13 import 'dart:async'; |
| 14 import 'dart:collection'; | 14 import 'dart:collection'; |
| 15 import 'dart:_internal'; | 15 import 'dart:_internal'; |
| 16 import 'dart:html'; | 16 import 'dart:html'; |
| 17 import 'dart:html_common'; | 17 import 'dart:html_common'; |
| 18 import 'dart:nativewrappers'; | 18 import 'dart:nativewrappers'; |
| 19 import 'dart:_blink' as _blink; | 19 import 'dart:_blink' as _blink; |
| 20 import 'dart:js' as js; | 20 import 'dart:js' as js; |
| 21 | 21 |
| 22 // DO NOT EDIT - unless you are editing documentation as per: | 22 // DO NOT EDIT - unless you are editing documentation as per: |
| 23 // https://code.google.com/p/dart/wiki/ContributingHTMLDocumentation | 23 // https://code.google.com/p/dart/wiki/ContributingHTMLDocumentation |
| 24 // Auto-generated dart:audio library. | 24 // Auto-generated dart:audio library. |
| 25 | 25 |
| 26 | 26 |
| 27 | 27 |
| 28 // Need a default constructor for constructing classes with mixins that are | |
| 29 // also extending NativeFieldWrapperClass2. Defining JsoNativeFieldWrapper | |
| 30 // extending NativeFieldWrapperClass2 creates a default constructor. | |
| 31 class JsoNativeFieldWrapper extends NativeFieldWrapperClass2 {} | |
| 32 | |
| 33 | 28 |
| 34 // FIXME: Can we make this private? | 29 // FIXME: Can we make this private? |
| 35 final web_sqlBlinkMap = { | 30 final web_sqlBlinkMap = { |
| 36 'Database': () => SqlDatabase, | 31 'Database': () => SqlDatabase, |
| 37 'SQLError': () => SqlError, | 32 'SQLError': () => SqlError, |
| 38 'SQLResultSet': () => SqlResultSet, | 33 'SQLResultSet': () => SqlResultSet, |
| 39 'SQLResultSetRowList': () => SqlResultSetRowList, | 34 'SQLResultSetRowList': () => SqlResultSetRowList, |
| 40 'SQLTransaction': () => SqlTransaction, | 35 'SQLTransaction': () => SqlTransaction, |
| 41 | 36 |
| 42 }; | 37 }; |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 // WARNING: Do not edit - generated code. | 96 // WARNING: Do not edit - generated code. |
| 102 | 97 |
| 103 | 98 |
| 104 @DocsEditable() | 99 @DocsEditable() |
| 105 @DomName('Database') | 100 @DomName('Database') |
| 106 @SupportedBrowser(SupportedBrowser.CHROME) | 101 @SupportedBrowser(SupportedBrowser.CHROME) |
| 107 @SupportedBrowser(SupportedBrowser.SAFARI) | 102 @SupportedBrowser(SupportedBrowser.SAFARI) |
| 108 @Experimental() | 103 @Experimental() |
| 109 // http://www.w3.org/TR/webdatabase/#asynchronous-database-api | 104 // http://www.w3.org/TR/webdatabase/#asynchronous-database-api |
| 110 @Experimental() // deprecated | 105 @Experimental() // deprecated |
| 111 class SqlDatabase extends NativeFieldWrapperClass2 { | 106 class SqlDatabase extends DartHtmlDomObject { |
| 112 // To suppress missing implicit constructor warnings. | 107 // To suppress missing implicit constructor warnings. |
| 113 factory SqlDatabase._() { throw new UnsupportedError("Not supported"); } | 108 factory SqlDatabase._() { throw new UnsupportedError("Not supported"); } |
| 114 | 109 |
| 115 static SqlDatabase internalCreateSqlDatabase() { | 110 static SqlDatabase internalCreateSqlDatabase() { |
| 116 return new SqlDatabase._internalWrap(); | 111 return new SqlDatabase._internalWrap(); |
| 117 } | 112 } |
| 118 | 113 |
| 119 js.JsObject blink_jsObject; | |
| 120 | |
| 121 factory SqlDatabase._internalWrap() { | 114 factory SqlDatabase._internalWrap() { |
| 122 return new SqlDatabase.internal_(); | 115 return new SqlDatabase.internal_(); |
| 123 } | 116 } |
| 124 | 117 |
| 125 SqlDatabase.internal_() { } | 118 SqlDatabase.internal_() { } |
| 126 | 119 |
| 127 bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(
this, other); | 120 bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(
this, other); |
| 128 int get hashCode => unwrap_jso(this).hashCode; | 121 int get hashCode => unwrap_jso(this).hashCode; |
| 129 | 122 |
| 130 /// Checks if this type is supported on the current platform. | 123 /// Checks if this type is supported on the current platform. |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 // for details. All rights reserved. Use of this source code is governed by a | 175 // for details. All rights reserved. Use of this source code is governed by a |
| 183 // BSD-style license that can be found in the LICENSE file. | 176 // BSD-style license that can be found in the LICENSE file. |
| 184 | 177 |
| 185 // WARNING: Do not edit - generated code. | 178 // WARNING: Do not edit - generated code. |
| 186 | 179 |
| 187 | 180 |
| 188 @DocsEditable() | 181 @DocsEditable() |
| 189 @DomName('SQLError') | 182 @DomName('SQLError') |
| 190 // http://www.w3.org/TR/webdatabase/#sqlerror | 183 // http://www.w3.org/TR/webdatabase/#sqlerror |
| 191 @Experimental() // deprecated | 184 @Experimental() // deprecated |
| 192 class SqlError extends NativeFieldWrapperClass2 { | 185 class SqlError extends DartHtmlDomObject { |
| 193 // To suppress missing implicit constructor warnings. | 186 // To suppress missing implicit constructor warnings. |
| 194 factory SqlError._() { throw new UnsupportedError("Not supported"); } | 187 factory SqlError._() { throw new UnsupportedError("Not supported"); } |
| 195 | 188 |
| 196 static SqlError internalCreateSqlError() { | 189 static SqlError internalCreateSqlError() { |
| 197 return new SqlError._internalWrap(); | 190 return new SqlError._internalWrap(); |
| 198 } | 191 } |
| 199 | 192 |
| 200 js.JsObject blink_jsObject; | |
| 201 | |
| 202 factory SqlError._internalWrap() { | 193 factory SqlError._internalWrap() { |
| 203 return new SqlError.internal_(); | 194 return new SqlError.internal_(); |
| 204 } | 195 } |
| 205 | 196 |
| 206 SqlError.internal_() { } | 197 SqlError.internal_() { } |
| 207 | 198 |
| 208 bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(
this, other); | 199 bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(
this, other); |
| 209 int get hashCode => unwrap_jso(this).hashCode; | 200 int get hashCode => unwrap_jso(this).hashCode; |
| 210 | 201 |
| 211 @DomName('SQLError.CONSTRAINT_ERR') | 202 @DomName('SQLError.CONSTRAINT_ERR') |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 // for details. All rights reserved. Use of this source code is governed by a | 244 // for details. All rights reserved. Use of this source code is governed by a |
| 254 // BSD-style license that can be found in the LICENSE file. | 245 // BSD-style license that can be found in the LICENSE file. |
| 255 | 246 |
| 256 // WARNING: Do not edit - generated code. | 247 // WARNING: Do not edit - generated code. |
| 257 | 248 |
| 258 | 249 |
| 259 @DocsEditable() | 250 @DocsEditable() |
| 260 @DomName('SQLResultSet') | 251 @DomName('SQLResultSet') |
| 261 // http://www.w3.org/TR/webdatabase/#sqlresultset | 252 // http://www.w3.org/TR/webdatabase/#sqlresultset |
| 262 @Experimental() // deprecated | 253 @Experimental() // deprecated |
| 263 class SqlResultSet extends NativeFieldWrapperClass2 { | 254 class SqlResultSet extends DartHtmlDomObject { |
| 264 // To suppress missing implicit constructor warnings. | 255 // To suppress missing implicit constructor warnings. |
| 265 factory SqlResultSet._() { throw new UnsupportedError("Not supported"); } | 256 factory SqlResultSet._() { throw new UnsupportedError("Not supported"); } |
| 266 | 257 |
| 267 static SqlResultSet internalCreateSqlResultSet() { | 258 static SqlResultSet internalCreateSqlResultSet() { |
| 268 return new SqlResultSet._internalWrap(); | 259 return new SqlResultSet._internalWrap(); |
| 269 } | 260 } |
| 270 | 261 |
| 271 js.JsObject blink_jsObject; | |
| 272 | |
| 273 factory SqlResultSet._internalWrap() { | 262 factory SqlResultSet._internalWrap() { |
| 274 return new SqlResultSet.internal_(); | 263 return new SqlResultSet.internal_(); |
| 275 } | 264 } |
| 276 | 265 |
| 277 SqlResultSet.internal_() { } | 266 SqlResultSet.internal_() { } |
| 278 | 267 |
| 279 bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(
this, other); | 268 bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(
this, other); |
| 280 int get hashCode => unwrap_jso(this).hashCode; | 269 int get hashCode => unwrap_jso(this).hashCode; |
| 281 | 270 |
| 282 @DomName('SQLResultSet.insertId') | 271 @DomName('SQLResultSet.insertId') |
| (...skipping 13 matching lines...) Expand all Loading... |
| 296 // for details. All rights reserved. Use of this source code is governed by a | 285 // for details. All rights reserved. Use of this source code is governed by a |
| 297 // BSD-style license that can be found in the LICENSE file. | 286 // BSD-style license that can be found in the LICENSE file. |
| 298 | 287 |
| 299 // WARNING: Do not edit - generated code. | 288 // WARNING: Do not edit - generated code. |
| 300 | 289 |
| 301 | 290 |
| 302 @DocsEditable() | 291 @DocsEditable() |
| 303 @DomName('SQLResultSetRowList') | 292 @DomName('SQLResultSetRowList') |
| 304 // http://www.w3.org/TR/webdatabase/#sqlresultsetrowlist | 293 // http://www.w3.org/TR/webdatabase/#sqlresultsetrowlist |
| 305 @Experimental() // deprecated | 294 @Experimental() // deprecated |
| 306 class SqlResultSetRowList extends JsoNativeFieldWrapper with ListMixin<Map>, Imm
utableListMixin<Map> implements List<Map> { | 295 class SqlResultSetRowList extends DartHtmlDomObject with ListMixin<Map>, Immutab
leListMixin<Map> implements List<Map> { |
| 307 // To suppress missing implicit constructor warnings. | 296 // To suppress missing implicit constructor warnings. |
| 308 factory SqlResultSetRowList._() { throw new UnsupportedError("Not supported");
} | 297 factory SqlResultSetRowList._() { throw new UnsupportedError("Not supported");
} |
| 309 | 298 |
| 310 static SqlResultSetRowList internalCreateSqlResultSetRowList() { | 299 static SqlResultSetRowList internalCreateSqlResultSetRowList() { |
| 311 return new SqlResultSetRowList._internalWrap(); | 300 return new SqlResultSetRowList._internalWrap(); |
| 312 } | 301 } |
| 313 | 302 |
| 314 js.JsObject blink_jsObject; | |
| 315 | |
| 316 factory SqlResultSetRowList._internalWrap() { | 303 factory SqlResultSetRowList._internalWrap() { |
| 317 return new SqlResultSetRowList.internal_(); | 304 return new SqlResultSetRowList.internal_(); |
| 318 } | 305 } |
| 319 | 306 |
| 320 SqlResultSetRowList.internal_() { } | 307 SqlResultSetRowList.internal_() { } |
| 321 | 308 |
| 322 bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(
this, other); | 309 bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(
this, other); |
| 323 int get hashCode => unwrap_jso(this).hashCode; | 310 int get hashCode => unwrap_jso(this).hashCode; |
| 324 | 311 |
| 325 @DomName('SQLResultSetRowList.length') | 312 @DomName('SQLResultSetRowList.length') |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 // WARNING: Do not edit - generated code. | 371 // WARNING: Do not edit - generated code. |
| 385 | 372 |
| 386 | 373 |
| 387 @DocsEditable() | 374 @DocsEditable() |
| 388 @DomName('SQLTransaction') | 375 @DomName('SQLTransaction') |
| 389 @SupportedBrowser(SupportedBrowser.CHROME) | 376 @SupportedBrowser(SupportedBrowser.CHROME) |
| 390 @SupportedBrowser(SupportedBrowser.SAFARI) | 377 @SupportedBrowser(SupportedBrowser.SAFARI) |
| 391 @Experimental() | 378 @Experimental() |
| 392 // http://www.w3.org/TR/webdatabase/#sqltransaction | 379 // http://www.w3.org/TR/webdatabase/#sqltransaction |
| 393 @deprecated // deprecated | 380 @deprecated // deprecated |
| 394 class SqlTransaction extends NativeFieldWrapperClass2 { | 381 class SqlTransaction extends DartHtmlDomObject { |
| 395 // To suppress missing implicit constructor warnings. | 382 // To suppress missing implicit constructor warnings. |
| 396 factory SqlTransaction._() { throw new UnsupportedError("Not supported"); } | 383 factory SqlTransaction._() { throw new UnsupportedError("Not supported"); } |
| 397 | 384 |
| 398 static SqlTransaction internalCreateSqlTransaction() { | 385 static SqlTransaction internalCreateSqlTransaction() { |
| 399 return new SqlTransaction._internalWrap(); | 386 return new SqlTransaction._internalWrap(); |
| 400 } | 387 } |
| 401 | 388 |
| 402 js.JsObject blink_jsObject; | |
| 403 | |
| 404 factory SqlTransaction._internalWrap() { | 389 factory SqlTransaction._internalWrap() { |
| 405 return new SqlTransaction.internal_(); | 390 return new SqlTransaction.internal_(); |
| 406 } | 391 } |
| 407 | 392 |
| 408 SqlTransaction.internal_() { } | 393 SqlTransaction.internal_() { } |
| 409 | 394 |
| 410 bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(
this, other); | 395 bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(
this, other); |
| 411 int get hashCode => unwrap_jso(this).hashCode; | 396 int get hashCode => unwrap_jso(this).hashCode; |
| 412 | 397 |
| 413 @DomName('SQLTransaction.executeSql') | 398 @DomName('SQLTransaction.executeSql') |
| 414 @DocsEditable() | 399 @DocsEditable() |
| 415 void executeSql(String sqlStatement, List<Object> arguments, [SqlStatementCall
back callback, SqlStatementErrorCallback errorCallback]) => _blink.BlinkSQLTrans
action.instance.executeSql_Callback_4_(unwrap_jso(this), sqlStatement, unwrap_js
o(arguments), unwrap_jso((transaction, resultSet) => callback(wrap_jso(transacti
on), wrap_jso(resultSet))), unwrap_jso((transaction, error) => errorCallback(wra
p_jso(transaction), wrap_jso(error)))); | 400 void executeSql(String sqlStatement, List<Object> arguments, [SqlStatementCall
back callback, SqlStatementErrorCallback errorCallback]) => _blink.BlinkSQLTrans
action.instance.executeSql_Callback_4_(unwrap_jso(this), sqlStatement, unwrap_js
o(arguments), unwrap_jso((transaction, resultSet) => callback(wrap_jso(transacti
on), wrap_jso(resultSet))), unwrap_jso((transaction, error) => errorCallback(wra
p_jso(transaction), wrap_jso(error)))); |
| 416 | 401 |
| 417 } | 402 } |
| OLD | NEW |