| 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 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 | 26 |
| 27 | 27 |
| 28 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 28 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 29 // for details. All rights reserved. Use of this source code is governed by a | 29 // for details. All rights reserved. Use of this source code is governed by a |
| 30 // BSD-style license that can be found in the LICENSE file. | 30 // BSD-style license that can be found in the LICENSE file. |
| 31 | 31 |
| 32 // WARNING: Do not edit - generated code. | 32 // WARNING: Do not edit - generated code. |
| 33 | 33 |
| 34 | 34 |
| 35 @DomName('SQLStatementCallback') |
| 36 // http://www.w3.org/TR/webdatabase/#sqlstatementcallback |
| 37 @Experimental // deprecated |
| 35 typedef void SqlStatementCallback(SqlTransaction transaction, SqlResultSet resul
tSet); | 38 typedef void SqlStatementCallback(SqlTransaction transaction, SqlResultSet resul
tSet); |
| 36 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 39 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 37 // for details. All rights reserved. Use of this source code is governed by a | 40 // for details. All rights reserved. Use of this source code is governed by a |
| 38 // BSD-style license that can be found in the LICENSE file. | 41 // BSD-style license that can be found in the LICENSE file. |
| 39 | 42 |
| 40 // WARNING: Do not edit - generated code. | 43 // WARNING: Do not edit - generated code. |
| 41 | 44 |
| 42 | 45 |
| 46 @DomName('SQLStatementErrorCallback') |
| 47 // http://www.w3.org/TR/webdatabase/#sqlstatementerrorcallback |
| 48 @Experimental // deprecated |
| 43 typedef void SqlStatementErrorCallback(SqlTransaction transaction, SqlError erro
r); | 49 typedef void SqlStatementErrorCallback(SqlTransaction transaction, SqlError erro
r); |
| 44 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 50 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 45 // for details. All rights reserved. Use of this source code is governed by a | 51 // for details. All rights reserved. Use of this source code is governed by a |
| 46 // BSD-style license that can be found in the LICENSE file. | 52 // BSD-style license that can be found in the LICENSE file. |
| 47 | 53 |
| 48 // WARNING: Do not edit - generated code. | 54 // WARNING: Do not edit - generated code. |
| 49 | 55 |
| 50 | 56 |
| 57 @DomName('SQLTransactionCallback') |
| 58 // http://www.w3.org/TR/webdatabase/#sqltransactioncallback |
| 59 @Experimental // deprecated |
| 51 typedef void SqlTransactionCallback(SqlTransaction transaction); | 60 typedef void SqlTransactionCallback(SqlTransaction transaction); |
| 52 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 61 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 53 // for details. All rights reserved. Use of this source code is governed by a | 62 // for details. All rights reserved. Use of this source code is governed by a |
| 54 // BSD-style license that can be found in the LICENSE file. | 63 // BSD-style license that can be found in the LICENSE file. |
| 55 | 64 |
| 56 // WARNING: Do not edit - generated code. | 65 // WARNING: Do not edit - generated code. |
| 57 | 66 |
| 58 | 67 |
| 68 @DomName('SQLTransactionErrorCallback') |
| 69 // http://www.w3.org/TR/webdatabase/#sqltransactionerrorcallback |
| 70 @Experimental // deprecated |
| 59 typedef void SqlTransactionErrorCallback(SqlError error); | 71 typedef void SqlTransactionErrorCallback(SqlError error); |
| 60 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 72 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 61 // for details. All rights reserved. Use of this source code is governed by a | 73 // for details. All rights reserved. Use of this source code is governed by a |
| 62 // BSD-style license that can be found in the LICENSE file. | 74 // BSD-style license that can be found in the LICENSE file. |
| 63 | 75 |
| 64 | 76 |
| 65 @DocsEditable | 77 @DocsEditable |
| 66 @DomName('Database') | 78 @DomName('Database') |
| 67 @SupportedBrowser(SupportedBrowser.CHROME) | 79 @SupportedBrowser(SupportedBrowser.CHROME) |
| 68 @SupportedBrowser(SupportedBrowser.SAFARI) | 80 @SupportedBrowser(SupportedBrowser.SAFARI) |
| 69 @Experimental | 81 @Experimental |
| 82 // http://www.w3.org/TR/webdatabase/#asynchronous-database-api |
| 83 @Experimental // deprecated |
| 70 class SqlDatabase native "Database" { | 84 class SqlDatabase native "Database" { |
| 71 | 85 |
| 72 /// Checks if this type is supported on the current platform. | 86 /// Checks if this type is supported on the current platform. |
| 73 static bool get supported => JS('bool', '!!(window.openDatabase)'); | 87 static bool get supported => JS('bool', '!!(window.openDatabase)'); |
| 74 | 88 |
| 75 @DomName('Database.version') | 89 @DomName('Database.version') |
| 76 @DocsEditable | 90 @DocsEditable |
| 77 final String version; | 91 final String version; |
| 78 | 92 |
| 79 /** | 93 /** |
| (...skipping 20 matching lines...) Expand all Loading... |
| 100 @DocsEditable | 114 @DocsEditable |
| 101 void transaction(SqlTransactionCallback callback, [SqlTransactionErrorCallback
errorCallback, VoidCallback successCallback]) native; | 115 void transaction(SqlTransactionCallback callback, [SqlTransactionErrorCallback
errorCallback, VoidCallback successCallback]) native; |
| 102 } | 116 } |
| 103 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 117 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 104 // for details. All rights reserved. Use of this source code is governed by a | 118 // for details. All rights reserved. Use of this source code is governed by a |
| 105 // BSD-style license that can be found in the LICENSE file. | 119 // BSD-style license that can be found in the LICENSE file. |
| 106 | 120 |
| 107 | 121 |
| 108 @DocsEditable | 122 @DocsEditable |
| 109 @DomName('SQLError') | 123 @DomName('SQLError') |
| 124 // http://www.w3.org/TR/webdatabase/#sqlerror |
| 125 @Experimental // deprecated |
| 110 class SqlError native "SQLError" { | 126 class SqlError native "SQLError" { |
| 111 | 127 |
| 112 @DomName('SQLError.CONSTRAINT_ERR') | 128 @DomName('SQLError.CONSTRAINT_ERR') |
| 113 @DocsEditable | 129 @DocsEditable |
| 114 static const int CONSTRAINT_ERR = 6; | 130 static const int CONSTRAINT_ERR = 6; |
| 115 | 131 |
| 116 @DomName('SQLError.DATABASE_ERR') | 132 @DomName('SQLError.DATABASE_ERR') |
| 117 @DocsEditable | 133 @DocsEditable |
| 118 static const int DATABASE_ERR = 1; | 134 static const int DATABASE_ERR = 1; |
| 119 | 135 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 149 @DocsEditable | 165 @DocsEditable |
| 150 final String message; | 166 final String message; |
| 151 } | 167 } |
| 152 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 168 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 153 // for details. All rights reserved. Use of this source code is governed by a | 169 // for details. All rights reserved. Use of this source code is governed by a |
| 154 // BSD-style license that can be found in the LICENSE file. | 170 // BSD-style license that can be found in the LICENSE file. |
| 155 | 171 |
| 156 | 172 |
| 157 @DocsEditable | 173 @DocsEditable |
| 158 @DomName('SQLException') | 174 @DomName('SQLException') |
| 175 // http://www.w3.org/TR/webdatabase/#sqlexception |
| 176 @Experimental // deprecated |
| 159 class SqlException native "SQLException" { | 177 class SqlException native "SQLException" { |
| 160 | 178 |
| 161 @DomName('SQLException.CONSTRAINT_ERR') | 179 @DomName('SQLException.CONSTRAINT_ERR') |
| 162 @DocsEditable | 180 @DocsEditable |
| 163 static const int CONSTRAINT_ERR = 6; | 181 static const int CONSTRAINT_ERR = 6; |
| 164 | 182 |
| 165 @DomName('SQLException.DATABASE_ERR') | 183 @DomName('SQLException.DATABASE_ERR') |
| 166 @DocsEditable | 184 @DocsEditable |
| 167 static const int DATABASE_ERR = 1; | 185 static const int DATABASE_ERR = 1; |
| 168 | 186 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 198 @DocsEditable | 216 @DocsEditable |
| 199 final String message; | 217 final String message; |
| 200 } | 218 } |
| 201 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 219 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 202 // for details. All rights reserved. Use of this source code is governed by a | 220 // for details. All rights reserved. Use of this source code is governed by a |
| 203 // BSD-style license that can be found in the LICENSE file. | 221 // BSD-style license that can be found in the LICENSE file. |
| 204 | 222 |
| 205 | 223 |
| 206 @DocsEditable | 224 @DocsEditable |
| 207 @DomName('SQLResultSet') | 225 @DomName('SQLResultSet') |
| 226 // http://www.w3.org/TR/webdatabase/#sqlresultset |
| 227 @Experimental // deprecated |
| 208 class SqlResultSet native "SQLResultSet" { | 228 class SqlResultSet native "SQLResultSet" { |
| 209 | 229 |
| 210 @DomName('SQLResultSet.insertId') | 230 @DomName('SQLResultSet.insertId') |
| 211 @DocsEditable | 231 @DocsEditable |
| 212 final int insertId; | 232 final int insertId; |
| 213 | 233 |
| 214 @DomName('SQLResultSet.rows') | 234 @DomName('SQLResultSet.rows') |
| 215 @DocsEditable | 235 @DocsEditable |
| 216 final SqlResultSetRowList rows; | 236 final SqlResultSetRowList rows; |
| 217 | 237 |
| 218 @DomName('SQLResultSet.rowsAffected') | 238 @DomName('SQLResultSet.rowsAffected') |
| 219 @DocsEditable | 239 @DocsEditable |
| 220 final int rowsAffected; | 240 final int rowsAffected; |
| 221 } | 241 } |
| 222 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 242 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 223 // for details. All rights reserved. Use of this source code is governed by a | 243 // for details. All rights reserved. Use of this source code is governed by a |
| 224 // BSD-style license that can be found in the LICENSE file. | 244 // BSD-style license that can be found in the LICENSE file. |
| 225 | 245 |
| 226 | 246 |
| 227 @DocsEditable | 247 @DocsEditable |
| 228 @DomName('SQLResultSetRowList') | 248 @DomName('SQLResultSetRowList') |
| 249 // http://www.w3.org/TR/webdatabase/#sqlresultsetrowlist |
| 250 @Experimental // deprecated |
| 229 class SqlResultSetRowList extends Interceptor with ListMixin<Map>, ImmutableList
Mixin<Map> implements JavaScriptIndexingBehavior, List<Map> native "SQLResultSet
RowList" { | 251 class SqlResultSetRowList extends Interceptor with ListMixin<Map>, ImmutableList
Mixin<Map> implements JavaScriptIndexingBehavior, List<Map> native "SQLResultSet
RowList" { |
| 230 | 252 |
| 231 @DomName('SQLResultSetRowList.length') | 253 @DomName('SQLResultSetRowList.length') |
| 232 @DocsEditable | 254 @DocsEditable |
| 233 int get length => JS("int", "#.length", this); | 255 int get length => JS("int", "#.length", this); |
| 234 | 256 |
| 235 Map operator[](int index) { | 257 Map operator[](int index) { |
| 236 if (JS("bool", "# >>> 0 !== # || # >= #", index, | 258 if (JS("bool", "# >>> 0 !== # || # >= #", index, |
| 237 index, index, length)) | 259 index, index, length)) |
| 238 throw new RangeError.range(index, 0, length); | 260 throw new RangeError.range(index, 0, length); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 313 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 292 // for details. All rights reserved. Use of this source code is governed by a | 314 // for details. All rights reserved. Use of this source code is governed by a |
| 293 // BSD-style license that can be found in the LICENSE file. | 315 // BSD-style license that can be found in the LICENSE file. |
| 294 | 316 |
| 295 | 317 |
| 296 @DocsEditable | 318 @DocsEditable |
| 297 @DomName('SQLTransaction') | 319 @DomName('SQLTransaction') |
| 298 @SupportedBrowser(SupportedBrowser.CHROME) | 320 @SupportedBrowser(SupportedBrowser.CHROME) |
| 299 @SupportedBrowser(SupportedBrowser.SAFARI) | 321 @SupportedBrowser(SupportedBrowser.SAFARI) |
| 300 @Experimental | 322 @Experimental |
| 323 // http://www.w3.org/TR/webdatabase/#sqltransaction |
| 324 @deprecated // deprecated |
| 301 class SqlTransaction native "SQLTransaction" { | 325 class SqlTransaction native "SQLTransaction" { |
| 302 | 326 |
| 303 @DomName('SQLTransaction.executeSql') | 327 @DomName('SQLTransaction.executeSql') |
| 304 @DocsEditable | 328 @DocsEditable |
| 305 void executeSql(String sqlStatement, List arguments, [SqlStatementCallback cal
lback, SqlStatementErrorCallback errorCallback]) native; | 329 void executeSql(String sqlStatement, List arguments, [SqlStatementCallback cal
lback, SqlStatementErrorCallback errorCallback]) native; |
| 306 } | 330 } |
| 307 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 331 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 308 // for details. All rights reserved. Use of this source code is governed by a | 332 // for details. All rights reserved. Use of this source code is governed by a |
| 309 // BSD-style license that can be found in the LICENSE file. | 333 // BSD-style license that can be found in the LICENSE file. |
| 310 | 334 |
| 311 | 335 |
| 312 @DocsEditable | 336 @DocsEditable |
| 313 @DomName('SQLTransactionSync') | 337 @DomName('SQLTransactionSync') |
| 314 @SupportedBrowser(SupportedBrowser.CHROME) | 338 @SupportedBrowser(SupportedBrowser.CHROME) |
| 315 @SupportedBrowser(SupportedBrowser.SAFARI) | 339 @SupportedBrowser(SupportedBrowser.SAFARI) |
| 316 @Experimental | 340 @Experimental |
| 341 // http://www.w3.org/TR/webdatabase/#sqltransactionsync |
| 342 @Experimental // deprecated |
| 317 abstract class _SQLTransactionSync native "SQLTransactionSync" { | 343 abstract class _SQLTransactionSync native "SQLTransactionSync" { |
| 318 } | 344 } |
| OLD | NEW |