| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 @DomName('Database') | 89 @DomName('Database') |
| 90 @SupportedBrowser(SupportedBrowser.CHROME) | 90 @SupportedBrowser(SupportedBrowser.CHROME) |
| 91 @SupportedBrowser(SupportedBrowser.SAFARI) | 91 @SupportedBrowser(SupportedBrowser.SAFARI) |
| 92 @Experimental() | 92 @Experimental() |
| 93 // http://www.w3.org/TR/webdatabase/#asynchronous-database-api | 93 // http://www.w3.org/TR/webdatabase/#asynchronous-database-api |
| 94 @Experimental() // deprecated | 94 @Experimental() // deprecated |
| 95 class SqlDatabase extends NativeFieldWrapperClass2 { | 95 class SqlDatabase extends NativeFieldWrapperClass2 { |
| 96 // To suppress missing implicit constructor warnings. | 96 // To suppress missing implicit constructor warnings. |
| 97 factory SqlDatabase._() { throw new UnsupportedError("Not supported"); } | 97 factory SqlDatabase._() { throw new UnsupportedError("Not supported"); } |
| 98 | 98 |
| 99 static SqlDatabase internalCreateSqlDatabase() { | |
| 100 return new SqlDatabase._internalWrap(); | |
| 101 } | |
| 102 | |
| 103 JsObject blink_jsObject = null; | |
| 104 | |
| 105 factory SqlDatabase._internalWrap() { | |
| 106 return new SqlDatabase._internal(); | |
| 107 } | |
| 108 | |
| 109 SqlDatabase._internal() { } | |
| 110 | |
| 111 bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(
this, other); | |
| 112 | |
| 113 /// Checks if this type is supported on the current platform. | 99 /// Checks if this type is supported on the current platform. |
| 114 static bool get supported => true; | 100 static bool get supported => true; |
| 115 | 101 |
| 116 @DomName('Database.version') | 102 @DomName('Database.version') |
| 117 @DocsEditable() | 103 @DocsEditable() |
| 118 String get version => _blink.BlinkDatabase.instance.version_Getter_(unwrap_jso
(this)); | 104 String get version => _blink.BlinkDatabase.instance.version_Getter_(unwrap_jso
(this)); |
| 119 | 105 |
| 120 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]) { |
| 121 if (successCallback != null) { | 107 if (successCallback != null) { |
| 122 _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... |
| 169 | 155 |
| 170 | 156 |
| 171 @DocsEditable() | 157 @DocsEditable() |
| 172 @DomName('SQLError') | 158 @DomName('SQLError') |
| 173 // http://www.w3.org/TR/webdatabase/#sqlerror | 159 // http://www.w3.org/TR/webdatabase/#sqlerror |
| 174 @Experimental() // deprecated | 160 @Experimental() // deprecated |
| 175 class SqlError extends NativeFieldWrapperClass2 { | 161 class SqlError extends NativeFieldWrapperClass2 { |
| 176 // To suppress missing implicit constructor warnings. | 162 // To suppress missing implicit constructor warnings. |
| 177 factory SqlError._() { throw new UnsupportedError("Not supported"); } | 163 factory SqlError._() { throw new UnsupportedError("Not supported"); } |
| 178 | 164 |
| 179 static SqlError internalCreateSqlError() { | |
| 180 return new SqlError._internalWrap(); | |
| 181 } | |
| 182 | |
| 183 JsObject blink_jsObject = null; | |
| 184 | |
| 185 factory SqlError._internalWrap() { | |
| 186 return new SqlError._internal(); | |
| 187 } | |
| 188 | |
| 189 SqlError._internal() { } | |
| 190 | |
| 191 bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(
this, other); | |
| 192 | |
| 193 @DomName('SQLError.CONSTRAINT_ERR') | 165 @DomName('SQLError.CONSTRAINT_ERR') |
| 194 @DocsEditable() | 166 @DocsEditable() |
| 195 static const int CONSTRAINT_ERR = 6; | 167 static const int CONSTRAINT_ERR = 6; |
| 196 | 168 |
| 197 @DomName('SQLError.DATABASE_ERR') | 169 @DomName('SQLError.DATABASE_ERR') |
| 198 @DocsEditable() | 170 @DocsEditable() |
| 199 static const int DATABASE_ERR = 1; | 171 static const int DATABASE_ERR = 1; |
| 200 | 172 |
| 201 @DomName('SQLError.QUOTA_ERR') | 173 @DomName('SQLError.QUOTA_ERR') |
| 202 @DocsEditable() | 174 @DocsEditable() |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 | 211 |
| 240 | 212 |
| 241 @DocsEditable() | 213 @DocsEditable() |
| 242 @DomName('SQLResultSet') | 214 @DomName('SQLResultSet') |
| 243 // http://www.w3.org/TR/webdatabase/#sqlresultset | 215 // http://www.w3.org/TR/webdatabase/#sqlresultset |
| 244 @Experimental() // deprecated | 216 @Experimental() // deprecated |
| 245 class SqlResultSet extends NativeFieldWrapperClass2 { | 217 class SqlResultSet extends NativeFieldWrapperClass2 { |
| 246 // To suppress missing implicit constructor warnings. | 218 // To suppress missing implicit constructor warnings. |
| 247 factory SqlResultSet._() { throw new UnsupportedError("Not supported"); } | 219 factory SqlResultSet._() { throw new UnsupportedError("Not supported"); } |
| 248 | 220 |
| 249 static SqlResultSet internalCreateSqlResultSet() { | |
| 250 return new SqlResultSet._internalWrap(); | |
| 251 } | |
| 252 | |
| 253 JsObject blink_jsObject = null; | |
| 254 | |
| 255 factory SqlResultSet._internalWrap() { | |
| 256 return new SqlResultSet._internal(); | |
| 257 } | |
| 258 | |
| 259 SqlResultSet._internal() { } | |
| 260 | |
| 261 bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(
this, other); | |
| 262 | |
| 263 @DomName('SQLResultSet.insertId') | 221 @DomName('SQLResultSet.insertId') |
| 264 @DocsEditable() | 222 @DocsEditable() |
| 265 int get insertId => _blink.BlinkSQLResultSet.instance.insertId_Getter_(unwrap_
jso(this)); | 223 int get insertId => _blink.BlinkSQLResultSet.instance.insertId_Getter_(unwrap_
jso(this)); |
| 266 | 224 |
| 267 @DomName('SQLResultSet.rows') | 225 @DomName('SQLResultSet.rows') |
| 268 @DocsEditable() | 226 @DocsEditable() |
| 269 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))); |
| 270 | 228 |
| 271 @DomName('SQLResultSet.rowsAffected') | 229 @DomName('SQLResultSet.rowsAffected') |
| 272 @DocsEditable() | 230 @DocsEditable() |
| 273 int get rowsAffected => _blink.BlinkSQLResultSet.instance.rowsAffected_Getter_
(unwrap_jso(this)); | 231 int get rowsAffected => _blink.BlinkSQLResultSet.instance.rowsAffected_Getter_
(unwrap_jso(this)); |
| 274 | 232 |
| 275 } | 233 } |
| 276 // 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 |
| 277 // 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 |
| 278 // BSD-style license that can be found in the LICENSE file. | 236 // BSD-style license that can be found in the LICENSE file. |
| 279 | 237 |
| 280 // WARNING: Do not edit - generated code. | 238 // WARNING: Do not edit - generated code. |
| 281 | 239 |
| 282 | 240 |
| 283 @DocsEditable() | 241 @DocsEditable() |
| 284 @DomName('SQLResultSetRowList') | 242 @DomName('SQLResultSetRowList') |
| 285 // http://www.w3.org/TR/webdatabase/#sqlresultsetrowlist | 243 // http://www.w3.org/TR/webdatabase/#sqlresultsetrowlist |
| 286 @Experimental() // deprecated | 244 @Experimental() // deprecated |
| 287 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> { |
| 288 // To suppress missing implicit constructor warnings. | 246 // To suppress missing implicit constructor warnings. |
| 289 factory SqlResultSetRowList._() { throw new UnsupportedError("Not supported");
} | 247 factory SqlResultSetRowList._() { throw new UnsupportedError("Not supported");
} |
| 290 | 248 |
| 291 static SqlResultSetRowList internalCreateSqlResultSetRowList() { | |
| 292 return new SqlResultSetRowList._internalWrap(); | |
| 293 } | |
| 294 | |
| 295 JsObject blink_jsObject = null; | |
| 296 | |
| 297 factory SqlResultSetRowList._internalWrap() { | |
| 298 return new SqlResultSetRowList._internal(); | |
| 299 } | |
| 300 | |
| 301 SqlResultSetRowList._internal() { } | |
| 302 | |
| 303 bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(
this, other); | |
| 304 | |
| 305 @DomName('SQLResultSetRowList.length') | 249 @DomName('SQLResultSetRowList.length') |
| 306 @DocsEditable() | 250 @DocsEditable() |
| 307 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)); |
| 308 | 252 |
| 309 Map operator[](int index) { | 253 Map operator[](int index) { |
| 310 if (index < 0 || index >= length) | 254 if (index < 0 || index >= length) |
| 311 throw new RangeError.index(index, this); | 255 throw new RangeError.index(index, this); |
| 312 return _blink.BlinkSQLResultSetRowList.instance.item_Callback_1_(unwrap_jso(
this), index); | 256 return _blink.BlinkSQLResultSetRowList.instance.item_Callback_1_(unwrap_jso(
this), index); |
| 313 } | 257 } |
| 314 | 258 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 @DomName('SQLTransaction') | 312 @DomName('SQLTransaction') |
| 369 @SupportedBrowser(SupportedBrowser.CHROME) | 313 @SupportedBrowser(SupportedBrowser.CHROME) |
| 370 @SupportedBrowser(SupportedBrowser.SAFARI) | 314 @SupportedBrowser(SupportedBrowser.SAFARI) |
| 371 @Experimental() | 315 @Experimental() |
| 372 // http://www.w3.org/TR/webdatabase/#sqltransaction | 316 // http://www.w3.org/TR/webdatabase/#sqltransaction |
| 373 @deprecated // deprecated | 317 @deprecated // deprecated |
| 374 class SqlTransaction extends NativeFieldWrapperClass2 { | 318 class SqlTransaction extends NativeFieldWrapperClass2 { |
| 375 // To suppress missing implicit constructor warnings. | 319 // To suppress missing implicit constructor warnings. |
| 376 factory SqlTransaction._() { throw new UnsupportedError("Not supported"); } | 320 factory SqlTransaction._() { throw new UnsupportedError("Not supported"); } |
| 377 | 321 |
| 378 static SqlTransaction internalCreateSqlTransaction() { | |
| 379 return new SqlTransaction._internalWrap(); | |
| 380 } | |
| 381 | |
| 382 JsObject blink_jsObject = null; | |
| 383 | |
| 384 factory SqlTransaction._internalWrap() { | |
| 385 return new SqlTransaction._internal(); | |
| 386 } | |
| 387 | |
| 388 SqlTransaction._internal() { } | |
| 389 | |
| 390 bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(
this, other); | |
| 391 | |
| 392 @DomName('SQLTransaction.executeSql') | 322 @DomName('SQLTransaction.executeSql') |
| 393 @DocsEditable() | 323 @DocsEditable() |
| 394 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)); |
| 395 | 325 |
| 396 } | 326 } |
| OLD | NEW |