| 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 16 matching lines...) Expand all Loading... |
| 27 // FIXME: Can we make this private? | 27 // FIXME: Can we make this private? |
| 28 final web_sqlBlinkMap = { | 28 final web_sqlBlinkMap = { |
| 29 'Database': () => SqlDatabase, | 29 'Database': () => SqlDatabase, |
| 30 'SQLError': () => SqlError, | 30 'SQLError': () => SqlError, |
| 31 'SQLResultSet': () => SqlResultSet, | 31 'SQLResultSet': () => SqlResultSet, |
| 32 'SQLResultSetRowList': () => SqlResultSetRowList, | 32 'SQLResultSetRowList': () => SqlResultSetRowList, |
| 33 'SQLTransaction': () => SqlTransaction, | 33 'SQLTransaction': () => SqlTransaction, |
| 34 | 34 |
| 35 }; | 35 }; |
| 36 | 36 |
| 37 // FIXME: Can we make this private? | |
| 38 final web_sqlBlinkFunctionMap = { | |
| 39 'Database': () => SqlDatabase.internalCreateSqlDatabase, | |
| 40 'SQLError': () => SqlError.internalCreateSqlError, | |
| 41 'SQLResultSet': () => SqlResultSet.internalCreateSqlResultSet, | |
| 42 'SQLResultSetRowList': () => SqlResultSetRowList.internalCreateSqlResultSetRow
List, | |
| 43 'SQLTransaction': () => SqlTransaction.internalCreateSqlTransaction, | |
| 44 | |
| 45 }; | |
| 46 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 37 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 47 // for details. All rights reserved. Use of this source code is governed by a | 38 // for details. All rights reserved. Use of this source code is governed by a |
| 48 // BSD-style license that can be found in the LICENSE file. | 39 // BSD-style license that can be found in the LICENSE file. |
| 49 | 40 |
| 50 // WARNING: Do not edit - generated code. | 41 // WARNING: Do not edit - generated code. |
| 51 | 42 |
| 52 | 43 |
| 53 @DomName('SQLStatementCallback') | 44 @DomName('SQLStatementCallback') |
| 54 // http://www.w3.org/TR/webdatabase/#sqlstatementcallback | 45 // http://www.w3.org/TR/webdatabase/#sqlstatementcallback |
| 55 @Experimental() // deprecated | 46 @Experimental() // deprecated |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 @DomName('Database') | 89 @DomName('Database') |
| 99 @SupportedBrowser(SupportedBrowser.CHROME) | 90 @SupportedBrowser(SupportedBrowser.CHROME) |
| 100 @SupportedBrowser(SupportedBrowser.SAFARI) | 91 @SupportedBrowser(SupportedBrowser.SAFARI) |
| 101 @Experimental() | 92 @Experimental() |
| 102 // http://www.w3.org/TR/webdatabase/#asynchronous-database-api | 93 // http://www.w3.org/TR/webdatabase/#asynchronous-database-api |
| 103 @Experimental() // deprecated | 94 @Experimental() // deprecated |
| 104 class SqlDatabase extends NativeFieldWrapperClass2 { | 95 class SqlDatabase extends NativeFieldWrapperClass2 { |
| 105 // To suppress missing implicit constructor warnings. | 96 // To suppress missing implicit constructor warnings. |
| 106 factory SqlDatabase._() { throw new UnsupportedError("Not supported"); } | 97 factory SqlDatabase._() { throw new UnsupportedError("Not supported"); } |
| 107 | 98 |
| 108 static SqlDatabase internalCreateSqlDatabase() { | |
| 109 return new SqlDatabase._internalWrap(); | |
| 110 } | |
| 111 | |
| 112 JsObject blink_jsObject = null; | |
| 113 | |
| 114 factory SqlDatabase._internalWrap() { | |
| 115 return new SqlDatabase._internal(); | |
| 116 } | |
| 117 | |
| 118 SqlDatabase._internal() { } | |
| 119 | |
| 120 bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(
this, other); | |
| 121 | |
| 122 /// Checks if this type is supported on the current platform. | 99 /// Checks if this type is supported on the current platform. |
| 123 static bool get supported => true; | 100 static bool get supported => true; |
| 124 | 101 |
| 125 @DomName('Database.version') | 102 @DomName('Database.version') |
| 126 @DocsEditable() | 103 @DocsEditable() |
| 127 String get version => _blink.BlinkDatabase.instance.version_Getter_(unwrap_jso
(this)); | 104 String get version => _blink.BlinkDatabase.instance.version_Getter_(unwrap_jso
(this)); |
| 128 | 105 |
| 129 void changeVersion(String oldVersion, String newVersion, [SqlTransactionCallba
ck callback, SqlTransactionErrorCallback errorCallback, VoidCallback successCall
back]) { | 106 void changeVersion(String oldVersion, String newVersion, [SqlTransactionCallba
ck callback, SqlTransactionErrorCallback errorCallback, VoidCallback successCall
back]) { |
| 130 if (successCallback != null) { | 107 if (successCallback != null) { |
| 131 _blink.BlinkDatabase.instance.changeVersion_Callback_5_(unwrap_jso(this),
oldVersion, newVersion, unwrap_jso(callback), unwrap_jso(errorCallback), unwrap_
jso(successCallback)); | 108 _blink.BlinkDatabase.instance.changeVersion_Callback_5_(unwrap_jso(this),
oldVersion, newVersion, unwrap_jso(callback), unwrap_jso(errorCallback), unwrap_
jso(successCallback)); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 | 155 |
| 179 | 156 |
| 180 @DocsEditable() | 157 @DocsEditable() |
| 181 @DomName('SQLError') | 158 @DomName('SQLError') |
| 182 // http://www.w3.org/TR/webdatabase/#sqlerror | 159 // http://www.w3.org/TR/webdatabase/#sqlerror |
| 183 @Experimental() // deprecated | 160 @Experimental() // deprecated |
| 184 class SqlError extends NativeFieldWrapperClass2 { | 161 class SqlError extends NativeFieldWrapperClass2 { |
| 185 // To suppress missing implicit constructor warnings. | 162 // To suppress missing implicit constructor warnings. |
| 186 factory SqlError._() { throw new UnsupportedError("Not supported"); } | 163 factory SqlError._() { throw new UnsupportedError("Not supported"); } |
| 187 | 164 |
| 188 static SqlError internalCreateSqlError() { | |
| 189 return new SqlError._internalWrap(); | |
| 190 } | |
| 191 | |
| 192 JsObject blink_jsObject = null; | |
| 193 | |
| 194 factory SqlError._internalWrap() { | |
| 195 return new SqlError._internal(); | |
| 196 } | |
| 197 | |
| 198 SqlError._internal() { } | |
| 199 | |
| 200 bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(
this, other); | |
| 201 | |
| 202 @DomName('SQLError.CONSTRAINT_ERR') | 165 @DomName('SQLError.CONSTRAINT_ERR') |
| 203 @DocsEditable() | 166 @DocsEditable() |
| 204 static const int CONSTRAINT_ERR = 6; | 167 static const int CONSTRAINT_ERR = 6; |
| 205 | 168 |
| 206 @DomName('SQLError.DATABASE_ERR') | 169 @DomName('SQLError.DATABASE_ERR') |
| 207 @DocsEditable() | 170 @DocsEditable() |
| 208 static const int DATABASE_ERR = 1; | 171 static const int DATABASE_ERR = 1; |
| 209 | 172 |
| 210 @DomName('SQLError.QUOTA_ERR') | 173 @DomName('SQLError.QUOTA_ERR') |
| 211 @DocsEditable() | 174 @DocsEditable() |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 | 211 |
| 249 | 212 |
| 250 @DocsEditable() | 213 @DocsEditable() |
| 251 @DomName('SQLResultSet') | 214 @DomName('SQLResultSet') |
| 252 // http://www.w3.org/TR/webdatabase/#sqlresultset | 215 // http://www.w3.org/TR/webdatabase/#sqlresultset |
| 253 @Experimental() // deprecated | 216 @Experimental() // deprecated |
| 254 class SqlResultSet extends NativeFieldWrapperClass2 { | 217 class SqlResultSet extends NativeFieldWrapperClass2 { |
| 255 // To suppress missing implicit constructor warnings. | 218 // To suppress missing implicit constructor warnings. |
| 256 factory SqlResultSet._() { throw new UnsupportedError("Not supported"); } | 219 factory SqlResultSet._() { throw new UnsupportedError("Not supported"); } |
| 257 | 220 |
| 258 static SqlResultSet internalCreateSqlResultSet() { | |
| 259 return new SqlResultSet._internalWrap(); | |
| 260 } | |
| 261 | |
| 262 JsObject blink_jsObject = null; | |
| 263 | |
| 264 factory SqlResultSet._internalWrap() { | |
| 265 return new SqlResultSet._internal(); | |
| 266 } | |
| 267 | |
| 268 SqlResultSet._internal() { } | |
| 269 | |
| 270 bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(
this, other); | |
| 271 | |
| 272 @DomName('SQLResultSet.insertId') | 221 @DomName('SQLResultSet.insertId') |
| 273 @DocsEditable() | 222 @DocsEditable() |
| 274 int get insertId => _blink.BlinkSQLResultSet.instance.insertId_Getter_(unwrap_
jso(this)); | 223 int get insertId => _blink.BlinkSQLResultSet.instance.insertId_Getter_(unwrap_
jso(this)); |
| 275 | 224 |
| 276 @DomName('SQLResultSet.rows') | 225 @DomName('SQLResultSet.rows') |
| 277 @DocsEditable() | 226 @DocsEditable() |
| 278 SqlResultSetRowList get rows => wrap_jso(_blink.BlinkSQLResultSet.instance.row
s_Getter_(unwrap_jso(this))); | 227 SqlResultSetRowList get rows => wrap_jso(_blink.BlinkSQLResultSet.instance.row
s_Getter_(unwrap_jso(this))); |
| 279 | 228 |
| 280 @DomName('SQLResultSet.rowsAffected') | 229 @DomName('SQLResultSet.rowsAffected') |
| 281 @DocsEditable() | 230 @DocsEditable() |
| 282 int get rowsAffected => _blink.BlinkSQLResultSet.instance.rowsAffected_Getter_
(unwrap_jso(this)); | 231 int get rowsAffected => _blink.BlinkSQLResultSet.instance.rowsAffected_Getter_
(unwrap_jso(this)); |
| 283 | 232 |
| 284 } | 233 } |
| 285 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 234 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 286 // for details. All rights reserved. Use of this source code is governed by a | 235 // for details. All rights reserved. Use of this source code is governed by a |
| 287 // BSD-style license that can be found in the LICENSE file. | 236 // BSD-style license that can be found in the LICENSE file. |
| 288 | 237 |
| 289 // WARNING: Do not edit - generated code. | 238 // WARNING: Do not edit - generated code. |
| 290 | 239 |
| 291 | 240 |
| 292 @DocsEditable() | 241 @DocsEditable() |
| 293 @DomName('SQLResultSetRowList') | 242 @DomName('SQLResultSetRowList') |
| 294 // http://www.w3.org/TR/webdatabase/#sqlresultsetrowlist | 243 // http://www.w3.org/TR/webdatabase/#sqlresultsetrowlist |
| 295 @Experimental() // deprecated | 244 @Experimental() // deprecated |
| 296 class SqlResultSetRowList extends NativeFieldWrapperClass2 with ListMixin<Map>,
ImmutableListMixin<Map> implements List<Map> { | 245 class SqlResultSetRowList extends NativeFieldWrapperClass2 with ListMixin<Map>,
ImmutableListMixin<Map> implements List<Map> { |
| 297 // To suppress missing implicit constructor warnings. | 246 // To suppress missing implicit constructor warnings. |
| 298 factory SqlResultSetRowList._() { throw new UnsupportedError("Not supported");
} | 247 factory SqlResultSetRowList._() { throw new UnsupportedError("Not supported");
} |
| 299 | 248 |
| 300 static SqlResultSetRowList internalCreateSqlResultSetRowList() { | |
| 301 return new SqlResultSetRowList._internalWrap(); | |
| 302 } | |
| 303 | |
| 304 JsObject blink_jsObject = null; | |
| 305 | |
| 306 factory SqlResultSetRowList._internalWrap() { | |
| 307 return new SqlResultSetRowList._internal(); | |
| 308 } | |
| 309 | |
| 310 SqlResultSetRowList._internal() { } | |
| 311 | |
| 312 bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(
this, other); | |
| 313 | |
| 314 @DomName('SQLResultSetRowList.length') | 249 @DomName('SQLResultSetRowList.length') |
| 315 @DocsEditable() | 250 @DocsEditable() |
| 316 int get length => _blink.BlinkSQLResultSetRowList.instance.length_Getter_(unwr
ap_jso(this)); | 251 int get length => _blink.BlinkSQLResultSetRowList.instance.length_Getter_(unwr
ap_jso(this)); |
| 317 | 252 |
| 318 Map operator[](int index) { | 253 Map operator[](int index) { |
| 319 if (index < 0 || index >= length) | 254 if (index < 0 || index >= length) |
| 320 throw new RangeError.index(index, this); | 255 throw new RangeError.index(index, this); |
| 321 return _blink.BlinkSQLResultSetRowList.instance.item_Callback_1_(unwrap_jso(
this), index); | 256 return _blink.BlinkSQLResultSetRowList.instance.item_Callback_1_(unwrap_jso(
this), index); |
| 322 } | 257 } |
| 323 | 258 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 @DomName('SQLTransaction') | 312 @DomName('SQLTransaction') |
| 378 @SupportedBrowser(SupportedBrowser.CHROME) | 313 @SupportedBrowser(SupportedBrowser.CHROME) |
| 379 @SupportedBrowser(SupportedBrowser.SAFARI) | 314 @SupportedBrowser(SupportedBrowser.SAFARI) |
| 380 @Experimental() | 315 @Experimental() |
| 381 // http://www.w3.org/TR/webdatabase/#sqltransaction | 316 // http://www.w3.org/TR/webdatabase/#sqltransaction |
| 382 @deprecated // deprecated | 317 @deprecated // deprecated |
| 383 class SqlTransaction extends NativeFieldWrapperClass2 { | 318 class SqlTransaction extends NativeFieldWrapperClass2 { |
| 384 // To suppress missing implicit constructor warnings. | 319 // To suppress missing implicit constructor warnings. |
| 385 factory SqlTransaction._() { throw new UnsupportedError("Not supported"); } | 320 factory SqlTransaction._() { throw new UnsupportedError("Not supported"); } |
| 386 | 321 |
| 387 static SqlTransaction internalCreateSqlTransaction() { | |
| 388 return new SqlTransaction._internalWrap(); | |
| 389 } | |
| 390 | |
| 391 JsObject blink_jsObject = null; | |
| 392 | |
| 393 factory SqlTransaction._internalWrap() { | |
| 394 return new SqlTransaction._internal(); | |
| 395 } | |
| 396 | |
| 397 SqlTransaction._internal() { } | |
| 398 | |
| 399 bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(
this, other); | |
| 400 | |
| 401 @DomName('SQLTransaction.executeSql') | 322 @DomName('SQLTransaction.executeSql') |
| 402 @DocsEditable() | 323 @DocsEditable() |
| 403 void executeSql(String sqlStatement, List<Object> arguments, [SqlStatementCall
back callback, SqlStatementErrorCallback errorCallback]) => _blink.BlinkSQLTrans
action.instance.executeSql_Callback_4_(unwrap_jso(this), sqlStatement, arguments
, unwrap_jso(callback), unwrap_jso(errorCallback)); | 324 void executeSql(String sqlStatement, List<Object> arguments, [SqlStatementCall
back callback, SqlStatementErrorCallback errorCallback]) => _blink.BlinkSQLTrans
action.instance.executeSql_Callback_4_(unwrap_jso(this), sqlStatement, arguments
, unwrap_jso(callback), unwrap_jso(errorCallback)); |
| 404 | 325 |
| 405 } | 326 } |
| OLD | NEW |