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