| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 59 // 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 | 60 // 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. | 61 // BSD-style license that can be found in the LICENSE file. |
| 62 | 62 |
| 63 | 63 |
| 64 @DocsEditable | 64 @DocsEditable |
| 65 @DomName('Database') | 65 @DomName('Database') |
| 66 @SupportedBrowser(SupportedBrowser.CHROME) | 66 @SupportedBrowser(SupportedBrowser.CHROME) |
| 67 @SupportedBrowser(SupportedBrowser.SAFARI) | 67 @SupportedBrowser(SupportedBrowser.SAFARI) |
| 68 @Experimental | 68 @Experimental |
| 69 class SqlDatabase native "*Database" { | 69 class SqlDatabase native "Database" { |
| 70 | 70 |
| 71 /// Checks if this type is supported on the current platform. | 71 /// Checks if this type is supported on the current platform. |
| 72 static bool get supported => JS('bool', '!!(window.openDatabase)'); | 72 static bool get supported => JS('bool', '!!(window.openDatabase)'); |
| 73 | 73 |
| 74 @DomName('Database.version') | 74 @DomName('Database.version') |
| 75 @DocsEditable | 75 @DocsEditable |
| 76 final String version; | 76 final String version; |
| 77 | 77 |
| 78 /** | 78 /** |
| 79 * Atomically update the database version to [newVersion], asynchronously | 79 * Atomically update the database version to [newVersion], asynchronously |
| (...skipping 19 matching lines...) Expand all Loading... |
| 99 @DocsEditable | 99 @DocsEditable |
| 100 void transaction(SqlTransactionCallback callback, [SqlTransactionErrorCallback
errorCallback, VoidCallback successCallback]) native; | 100 void transaction(SqlTransactionCallback callback, [SqlTransactionErrorCallback
errorCallback, VoidCallback successCallback]) native; |
| 101 } | 101 } |
| 102 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 102 // 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 | 103 // 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. | 104 // BSD-style license that can be found in the LICENSE file. |
| 105 | 105 |
| 106 | 106 |
| 107 @DocsEditable | 107 @DocsEditable |
| 108 @DomName('SQLError') | 108 @DomName('SQLError') |
| 109 class SqlError native "*SQLError" { | 109 class SqlError native "SQLError" { |
| 110 | 110 |
| 111 static const int CONSTRAINT_ERR = 6; | 111 static const int CONSTRAINT_ERR = 6; |
| 112 | 112 |
| 113 static const int DATABASE_ERR = 1; | 113 static const int DATABASE_ERR = 1; |
| 114 | 114 |
| 115 static const int QUOTA_ERR = 4; | 115 static const int QUOTA_ERR = 4; |
| 116 | 116 |
| 117 static const int SYNTAX_ERR = 5; | 117 static const int SYNTAX_ERR = 5; |
| 118 | 118 |
| 119 static const int TIMEOUT_ERR = 7; | 119 static const int TIMEOUT_ERR = 7; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 132 @DocsEditable | 132 @DocsEditable |
| 133 final String message; | 133 final String message; |
| 134 } | 134 } |
| 135 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 135 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 136 // for details. All rights reserved. Use of this source code is governed by a | 136 // for details. All rights reserved. Use of this source code is governed by a |
| 137 // BSD-style license that can be found in the LICENSE file. | 137 // BSD-style license that can be found in the LICENSE file. |
| 138 | 138 |
| 139 | 139 |
| 140 @DocsEditable | 140 @DocsEditable |
| 141 @DomName('SQLException') | 141 @DomName('SQLException') |
| 142 class SqlException native "*SQLException" { | 142 class SqlException native "SQLException" { |
| 143 | 143 |
| 144 static const int CONSTRAINT_ERR = 6; | 144 static const int CONSTRAINT_ERR = 6; |
| 145 | 145 |
| 146 static const int DATABASE_ERR = 1; | 146 static const int DATABASE_ERR = 1; |
| 147 | 147 |
| 148 static const int QUOTA_ERR = 4; | 148 static const int QUOTA_ERR = 4; |
| 149 | 149 |
| 150 static const int SYNTAX_ERR = 5; | 150 static const int SYNTAX_ERR = 5; |
| 151 | 151 |
| 152 static const int TIMEOUT_ERR = 7; | 152 static const int TIMEOUT_ERR = 7; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 165 @DocsEditable | 165 @DocsEditable |
| 166 final String message; | 166 final String message; |
| 167 } | 167 } |
| 168 // 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 |
| 169 // 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 |
| 170 // BSD-style license that can be found in the LICENSE file. | 170 // BSD-style license that can be found in the LICENSE file. |
| 171 | 171 |
| 172 | 172 |
| 173 @DocsEditable | 173 @DocsEditable |
| 174 @DomName('SQLResultSet') | 174 @DomName('SQLResultSet') |
| 175 class SqlResultSet native "*SQLResultSet" { | 175 class SqlResultSet native "SQLResultSet" { |
| 176 | 176 |
| 177 @DomName('SQLResultSet.insertId') | 177 @DomName('SQLResultSet.insertId') |
| 178 @DocsEditable | 178 @DocsEditable |
| 179 final int insertId; | 179 final int insertId; |
| 180 | 180 |
| 181 @DomName('SQLResultSet.rows') | 181 @DomName('SQLResultSet.rows') |
| 182 @DocsEditable | 182 @DocsEditable |
| 183 final SqlResultSetRowList rows; | 183 final SqlResultSetRowList rows; |
| 184 | 184 |
| 185 @DomName('SQLResultSet.rowsAffected') | 185 @DomName('SQLResultSet.rowsAffected') |
| 186 @DocsEditable | 186 @DocsEditable |
| 187 final int rowsAffected; | 187 final int rowsAffected; |
| 188 } | 188 } |
| 189 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 189 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 190 // for details. All rights reserved. Use of this source code is governed by a | 190 // for details. All rights reserved. Use of this source code is governed by a |
| 191 // BSD-style license that can be found in the LICENSE file. | 191 // BSD-style license that can be found in the LICENSE file. |
| 192 | 192 |
| 193 | 193 |
| 194 @DocsEditable | 194 @DocsEditable |
| 195 @DomName('SQLResultSetRowList') | 195 @DomName('SQLResultSetRowList') |
| 196 class SqlResultSetRowList implements JavaScriptIndexingBehavior, List<Map> nativ
e "*SQLResultSetRowList" { | 196 class SqlResultSetRowList implements JavaScriptIndexingBehavior, List<Map> nativ
e "SQLResultSetRowList" { |
| 197 | 197 |
| 198 @DomName('SQLResultSetRowList.length') | 198 @DomName('SQLResultSetRowList.length') |
| 199 @DocsEditable | 199 @DocsEditable |
| 200 int get length => JS("int", "#.length", this); | 200 int get length => JS("int", "#.length", this); |
| 201 | 201 |
| 202 Map operator[](int index) => this.item(index); | 202 Map operator[](int index) => this.item(index); |
| 203 | 203 |
| 204 void operator[]=(int index, Map value) { | 204 void operator[]=(int index, Map value) { |
| 205 throw new UnsupportedError("Cannot assign element of immutable List."); | 205 throw new UnsupportedError("Cannot assign element of immutable List."); |
| 206 } | 206 } |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 414 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 415 // for details. All rights reserved. Use of this source code is governed by a | 415 // for details. All rights reserved. Use of this source code is governed by a |
| 416 // BSD-style license that can be found in the LICENSE file. | 416 // BSD-style license that can be found in the LICENSE file. |
| 417 | 417 |
| 418 | 418 |
| 419 @DocsEditable | 419 @DocsEditable |
| 420 @DomName('SQLTransaction') | 420 @DomName('SQLTransaction') |
| 421 @SupportedBrowser(SupportedBrowser.CHROME) | 421 @SupportedBrowser(SupportedBrowser.CHROME) |
| 422 @SupportedBrowser(SupportedBrowser.SAFARI) | 422 @SupportedBrowser(SupportedBrowser.SAFARI) |
| 423 @Experimental | 423 @Experimental |
| 424 class SqlTransaction native "*SQLTransaction" { | 424 class SqlTransaction native "SQLTransaction" { |
| 425 | 425 |
| 426 @DomName('SQLTransaction.executeSql') | 426 @DomName('SQLTransaction.executeSql') |
| 427 @DocsEditable | 427 @DocsEditable |
| 428 void executeSql(String sqlStatement, List arguments, [SqlStatementCallback cal
lback, SqlStatementErrorCallback errorCallback]) native; | 428 void executeSql(String sqlStatement, List arguments, [SqlStatementCallback cal
lback, SqlStatementErrorCallback errorCallback]) native; |
| 429 } | 429 } |
| 430 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 430 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 431 // for details. All rights reserved. Use of this source code is governed by a | 431 // for details. All rights reserved. Use of this source code is governed by a |
| 432 // BSD-style license that can be found in the LICENSE file. | 432 // BSD-style license that can be found in the LICENSE file. |
| 433 | 433 |
| 434 | 434 |
| 435 @DocsEditable | 435 @DocsEditable |
| 436 @DomName('SQLTransactionSync') | 436 @DomName('SQLTransactionSync') |
| 437 @SupportedBrowser(SupportedBrowser.CHROME) | 437 @SupportedBrowser(SupportedBrowser.CHROME) |
| 438 @SupportedBrowser(SupportedBrowser.SAFARI) | 438 @SupportedBrowser(SupportedBrowser.SAFARI) |
| 439 @Experimental | 439 @Experimental |
| 440 abstract class _SQLTransactionSync native "*SQLTransactionSync" { | 440 abstract class _SQLTransactionSync native "SQLTransactionSync" { |
| 441 } | 441 } |
| OLD | NEW |