| OLD | NEW |
| (Empty) | |
| 1 library dart.dom.web_sql; |
| 2 |
| 3 import 'dart:async'; |
| 4 import 'dart:collection'; |
| 5 import 'dart:html'; |
| 6 import 'dart:html_common'; |
| 7 import 'dart:nativewrappers'; |
| 8 // DO NOT EDIT - unless you are editing documentation as per: |
| 9 // https://code.google.com/p/dart/wiki/ContributingHTMLDocumentation |
| 10 // Auto-generated dart:audio library. |
| 11 |
| 12 |
| 13 |
| 14 |
| 15 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 16 // for details. All rights reserved. Use of this source code is governed by a |
| 17 // BSD-style license that can be found in the LICENSE file. |
| 18 |
| 19 // WARNING: Do not edit - generated code. |
| 20 |
| 21 |
| 22 typedef void DatabaseCallback(database); |
| 23 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 24 // for details. All rights reserved. Use of this source code is governed by a |
| 25 // BSD-style license that can be found in the LICENSE file. |
| 26 |
| 27 // WARNING: Do not edit - generated code. |
| 28 |
| 29 |
| 30 typedef void SqlStatementCallback(SqlTransaction transaction, SqlResultSet resul
tSet); |
| 31 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 32 // for details. All rights reserved. Use of this source code is governed by a |
| 33 // BSD-style license that can be found in the LICENSE file. |
| 34 |
| 35 // WARNING: Do not edit - generated code. |
| 36 |
| 37 |
| 38 typedef void SqlStatementErrorCallback(SqlTransaction transaction, SqlError erro
r); |
| 39 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 40 // for details. All rights reserved. Use of this source code is governed by a |
| 41 // BSD-style license that can be found in the LICENSE file. |
| 42 |
| 43 // WARNING: Do not edit - generated code. |
| 44 |
| 45 |
| 46 typedef void SqlTransactionCallback(SqlTransaction transaction); |
| 47 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 48 // for details. All rights reserved. Use of this source code is governed by a |
| 49 // BSD-style license that can be found in the LICENSE file. |
| 50 |
| 51 // WARNING: Do not edit - generated code. |
| 52 |
| 53 |
| 54 typedef void SqlTransactionErrorCallback(SqlError error); |
| 55 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 56 // for details. All rights reserved. Use of this source code is governed by a |
| 57 // BSD-style license that can be found in the LICENSE file. |
| 58 |
| 59 // WARNING: Do not edit - generated code. |
| 60 |
| 61 |
| 62 typedef void SqlTransactionSyncCallback(SqlTransactionSync transaction); |
| 63 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 64 // for details. All rights reserved. Use of this source code is governed by a |
| 65 // BSD-style license that can be found in the LICENSE file. |
| 66 |
| 67 // WARNING: Do not edit - generated code. |
| 68 |
| 69 |
| 70 @DocsEditable |
| 71 @DomName('Database') |
| 72 @SupportedBrowser(SupportedBrowser.CHROME) |
| 73 @SupportedBrowser(SupportedBrowser.SAFARI) |
| 74 @Experimental |
| 75 class SqlDatabase extends NativeFieldWrapperClass1 { |
| 76 SqlDatabase.internal(); |
| 77 |
| 78 /// Checks if this type is supported on the current platform. |
| 79 static bool get supported => true; |
| 80 |
| 81 @DomName('Database.version') |
| 82 @DocsEditable |
| 83 String get version native "Database_version_Getter"; |
| 84 |
| 85 @DomName('Database.changeVersion') |
| 86 @DocsEditable |
| 87 void changeVersion(String oldVersion, String newVersion, [SqlTransactionCallba
ck callback, SqlTransactionErrorCallback errorCallback, VoidCallback successCall
back]) native "Database_changeVersion_Callback"; |
| 88 |
| 89 @DomName('Database.readTransaction') |
| 90 @DocsEditable |
| 91 void readTransaction(SqlTransactionCallback callback, [SqlTransactionErrorCall
back errorCallback, VoidCallback successCallback]) native "Database_readTransact
ion_Callback"; |
| 92 |
| 93 @DomName('Database.transaction') |
| 94 @DocsEditable |
| 95 void transaction(SqlTransactionCallback callback, [SqlTransactionErrorCallback
errorCallback, VoidCallback successCallback]) native "Database_transaction_Call
back"; |
| 96 |
| 97 } |
| 98 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 99 // for details. All rights reserved. Use of this source code is governed by a |
| 100 // BSD-style license that can be found in the LICENSE file. |
| 101 |
| 102 // WARNING: Do not edit - generated code. |
| 103 |
| 104 |
| 105 @DocsEditable |
| 106 @DomName('DatabaseSync') |
| 107 @SupportedBrowser(SupportedBrowser.CHROME) |
| 108 @SupportedBrowser(SupportedBrowser.SAFARI) |
| 109 @Experimental |
| 110 class SqlDatabaseSync extends NativeFieldWrapperClass1 { |
| 111 SqlDatabaseSync.internal(); |
| 112 |
| 113 @DomName('DatabaseSync.lastErrorMessage') |
| 114 @DocsEditable |
| 115 String get lastErrorMessage native "DatabaseSync_lastErrorMessage_Getter"; |
| 116 |
| 117 @DomName('DatabaseSync.version') |
| 118 @DocsEditable |
| 119 String get version native "DatabaseSync_version_Getter"; |
| 120 |
| 121 @DomName('DatabaseSync.changeVersion') |
| 122 @DocsEditable |
| 123 void changeVersion(String oldVersion, String newVersion, [SqlTransactionSyncCa
llback callback]) native "DatabaseSync_changeVersion_Callback"; |
| 124 |
| 125 @DomName('DatabaseSync.readTransaction') |
| 126 @DocsEditable |
| 127 void readTransaction(SqlTransactionSyncCallback callback) native "DatabaseSync
_readTransaction_Callback"; |
| 128 |
| 129 @DomName('DatabaseSync.transaction') |
| 130 @DocsEditable |
| 131 void transaction(SqlTransactionSyncCallback callback) native "DatabaseSync_tra
nsaction_Callback"; |
| 132 |
| 133 } |
| 134 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 135 // for details. All rights reserved. Use of this source code is governed by a |
| 136 // BSD-style license that can be found in the LICENSE file. |
| 137 |
| 138 // WARNING: Do not edit - generated code. |
| 139 |
| 140 |
| 141 @DocsEditable |
| 142 @DomName('SQLError') |
| 143 class SqlError extends NativeFieldWrapperClass1 { |
| 144 SqlError.internal(); |
| 145 |
| 146 static const int CONSTRAINT_ERR = 6; |
| 147 |
| 148 static const int DATABASE_ERR = 1; |
| 149 |
| 150 static const int QUOTA_ERR = 4; |
| 151 |
| 152 static const int SYNTAX_ERR = 5; |
| 153 |
| 154 static const int TIMEOUT_ERR = 7; |
| 155 |
| 156 static const int TOO_LARGE_ERR = 3; |
| 157 |
| 158 static const int UNKNOWN_ERR = 0; |
| 159 |
| 160 static const int VERSION_ERR = 2; |
| 161 |
| 162 @DomName('SQLError.code') |
| 163 @DocsEditable |
| 164 int get code native "SQLError_code_Getter"; |
| 165 |
| 166 @DomName('SQLError.message') |
| 167 @DocsEditable |
| 168 String get message native "SQLError_message_Getter"; |
| 169 |
| 170 } |
| 171 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 172 // for details. All rights reserved. Use of this source code is governed by a |
| 173 // BSD-style license that can be found in the LICENSE file. |
| 174 |
| 175 // WARNING: Do not edit - generated code. |
| 176 |
| 177 |
| 178 @DocsEditable |
| 179 @DomName('SQLException') |
| 180 class SqlException extends NativeFieldWrapperClass1 { |
| 181 SqlException.internal(); |
| 182 |
| 183 static const int CONSTRAINT_ERR = 6; |
| 184 |
| 185 static const int DATABASE_ERR = 1; |
| 186 |
| 187 static const int QUOTA_ERR = 4; |
| 188 |
| 189 static const int SYNTAX_ERR = 5; |
| 190 |
| 191 static const int TIMEOUT_ERR = 7; |
| 192 |
| 193 static const int TOO_LARGE_ERR = 3; |
| 194 |
| 195 static const int UNKNOWN_ERR = 0; |
| 196 |
| 197 static const int VERSION_ERR = 2; |
| 198 |
| 199 @DomName('SQLException.code') |
| 200 @DocsEditable |
| 201 int get code native "SQLException_code_Getter"; |
| 202 |
| 203 @DomName('SQLException.message') |
| 204 @DocsEditable |
| 205 String get message native "SQLException_message_Getter"; |
| 206 |
| 207 } |
| 208 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 209 // for details. All rights reserved. Use of this source code is governed by a |
| 210 // BSD-style license that can be found in the LICENSE file. |
| 211 |
| 212 // WARNING: Do not edit - generated code. |
| 213 |
| 214 |
| 215 @DocsEditable |
| 216 @DomName('SQLResultSet') |
| 217 class SqlResultSet extends NativeFieldWrapperClass1 { |
| 218 SqlResultSet.internal(); |
| 219 |
| 220 @DomName('SQLResultSet.insertId') |
| 221 @DocsEditable |
| 222 int get insertId native "SQLResultSet_insertId_Getter"; |
| 223 |
| 224 @DomName('SQLResultSet.rows') |
| 225 @DocsEditable |
| 226 SqlResultSetRowList get rows native "SQLResultSet_rows_Getter"; |
| 227 |
| 228 @DomName('SQLResultSet.rowsAffected') |
| 229 @DocsEditable |
| 230 int get rowsAffected native "SQLResultSet_rowsAffected_Getter"; |
| 231 |
| 232 } |
| 233 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 234 // for details. All rights reserved. Use of this source code is governed by a |
| 235 // BSD-style license that can be found in the LICENSE file. |
| 236 |
| 237 // WARNING: Do not edit - generated code. |
| 238 |
| 239 |
| 240 @DocsEditable |
| 241 @DomName('SQLResultSetRowList') |
| 242 class SqlResultSetRowList extends NativeFieldWrapperClass1 implements List<Map>
{ |
| 243 SqlResultSetRowList.internal(); |
| 244 |
| 245 @DomName('SQLResultSetRowList.length') |
| 246 @DocsEditable |
| 247 int get length native "SQLResultSetRowList_length_Getter"; |
| 248 |
| 249 Map operator[](int index) native "SQLResultSetRowList_item_Callback"; |
| 250 |
| 251 void operator[]=(int index, Map value) { |
| 252 throw new UnsupportedError("Cannot assign element of immutable List."); |
| 253 } |
| 254 // -- start List<Map> mixins. |
| 255 // Map is the element type. |
| 256 |
| 257 // From Iterable<Map>: |
| 258 |
| 259 Iterator<Map> get iterator { |
| 260 // Note: NodeLists are not fixed size. And most probably length shouldn't |
| 261 // be cached in both iterator _and_ forEach method. For now caching it |
| 262 // for consistency. |
| 263 return new FixedSizeListIterator<Map>(this); |
| 264 } |
| 265 |
| 266 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Map)) { |
| 267 return IterableMixinWorkaround.reduce(this, initialValue, combine); |
| 268 } |
| 269 |
| 270 bool contains(Map element) => IterableMixinWorkaround.contains(this, element); |
| 271 |
| 272 void forEach(void f(Map element)) => IterableMixinWorkaround.forEach(this, f); |
| 273 |
| 274 String join([String separator]) => |
| 275 IterableMixinWorkaround.joinList(this, separator); |
| 276 |
| 277 Iterable map(f(Map element)) => |
| 278 IterableMixinWorkaround.mapList(this, f); |
| 279 |
| 280 Iterable<Map> where(bool f(Map element)) => |
| 281 IterableMixinWorkaround.where(this, f); |
| 282 |
| 283 Iterable expand(Iterable f(Map element)) => |
| 284 IterableMixinWorkaround.expand(this, f); |
| 285 |
| 286 bool every(bool f(Map element)) => IterableMixinWorkaround.every(this, f); |
| 287 |
| 288 bool any(bool f(Map element)) => IterableMixinWorkaround.any(this, f); |
| 289 |
| 290 List<Map> toList() => new List<Map>.from(this); |
| 291 Set<Map> toSet() => new Set<Map>.from(this); |
| 292 |
| 293 bool get isEmpty => this.length == 0; |
| 294 |
| 295 Iterable<Map> take(int n) => IterableMixinWorkaround.takeList(this, n); |
| 296 |
| 297 Iterable<Map> takeWhile(bool test(Map value)) { |
| 298 return IterableMixinWorkaround.takeWhile(this, test); |
| 299 } |
| 300 |
| 301 Iterable<Map> skip(int n) => IterableMixinWorkaround.skipList(this, n); |
| 302 |
| 303 Iterable<Map> skipWhile(bool test(Map value)) { |
| 304 return IterableMixinWorkaround.skipWhile(this, test); |
| 305 } |
| 306 |
| 307 Map firstMatching(bool test(Map value), { Map orElse() }) { |
| 308 return IterableMixinWorkaround.firstMatching(this, test, orElse); |
| 309 } |
| 310 |
| 311 Map lastMatching(bool test(Map value), {Map orElse()}) { |
| 312 return IterableMixinWorkaround.lastMatchingInList(this, test, orElse); |
| 313 } |
| 314 |
| 315 Map singleMatching(bool test(Map value)) { |
| 316 return IterableMixinWorkaround.singleMatching(this, test); |
| 317 } |
| 318 |
| 319 Map elementAt(int index) { |
| 320 return this[index]; |
| 321 } |
| 322 |
| 323 // From Collection<Map>: |
| 324 |
| 325 void add(Map value) { |
| 326 throw new UnsupportedError("Cannot add to immutable List."); |
| 327 } |
| 328 |
| 329 void addLast(Map value) { |
| 330 throw new UnsupportedError("Cannot add to immutable List."); |
| 331 } |
| 332 |
| 333 void addAll(Iterable<Map> iterable) { |
| 334 throw new UnsupportedError("Cannot add to immutable List."); |
| 335 } |
| 336 |
| 337 // From List<Map>: |
| 338 void set length(int value) { |
| 339 throw new UnsupportedError("Cannot resize immutable List."); |
| 340 } |
| 341 |
| 342 void clear() { |
| 343 throw new UnsupportedError("Cannot clear immutable List."); |
| 344 } |
| 345 |
| 346 Iterable<Map> get reversed { |
| 347 return IterableMixinWorkaround.reversedList(this); |
| 348 } |
| 349 |
| 350 void sort([int compare(Map a, Map b)]) { |
| 351 throw new UnsupportedError("Cannot sort immutable List."); |
| 352 } |
| 353 |
| 354 int indexOf(Map element, [int start = 0]) => |
| 355 Lists.indexOf(this, element, start, this.length); |
| 356 |
| 357 int lastIndexOf(Map element, [int start]) { |
| 358 if (start == null) start = length - 1; |
| 359 return Lists.lastIndexOf(this, element, start); |
| 360 } |
| 361 |
| 362 Map get first { |
| 363 if (this.length > 0) return this[0]; |
| 364 throw new StateError("No elements"); |
| 365 } |
| 366 |
| 367 Map get last { |
| 368 if (this.length > 0) return this[this.length - 1]; |
| 369 throw new StateError("No elements"); |
| 370 } |
| 371 |
| 372 Map get single { |
| 373 if (length == 1) return this[0]; |
| 374 if (length == 0) throw new StateError("No elements"); |
| 375 throw new StateError("More than one element"); |
| 376 } |
| 377 |
| 378 Map min([int compare(Map a, Map b)]) => |
| 379 IterableMixinWorkaround.min(this, compare); |
| 380 |
| 381 Map max([int compare(Map a, Map b)]) => |
| 382 IterableMixinWorkaround.max(this, compare); |
| 383 |
| 384 Map removeAt(int pos) { |
| 385 throw new UnsupportedError("Cannot remove from immutable List."); |
| 386 } |
| 387 |
| 388 Map removeLast() { |
| 389 throw new UnsupportedError("Cannot remove from immutable List."); |
| 390 } |
| 391 |
| 392 void remove(Object object) { |
| 393 throw new UnsupportedError("Cannot remove from immutable List."); |
| 394 } |
| 395 |
| 396 void removeAll(Iterable elements) { |
| 397 throw new UnsupportedError("Cannot remove from immutable List."); |
| 398 } |
| 399 |
| 400 void retainAll(Iterable elements) { |
| 401 throw new UnsupportedError("Cannot remove from immutable List."); |
| 402 } |
| 403 |
| 404 void removeMatching(bool test(Map element)) { |
| 405 throw new UnsupportedError("Cannot remove from immutable List."); |
| 406 } |
| 407 |
| 408 void retainMatching(bool test(Map element)) { |
| 409 throw new UnsupportedError("Cannot remove from immutable List."); |
| 410 } |
| 411 |
| 412 void setRange(int start, int rangeLength, List<Map> from, [int startFrom]) { |
| 413 throw new UnsupportedError("Cannot setRange on immutable List."); |
| 414 } |
| 415 |
| 416 void removeRange(int start, int rangeLength) { |
| 417 throw new UnsupportedError("Cannot removeRange on immutable List."); |
| 418 } |
| 419 |
| 420 void insertRange(int start, int rangeLength, [Map initialValue]) { |
| 421 throw new UnsupportedError("Cannot insertRange on immutable List."); |
| 422 } |
| 423 |
| 424 List<Map> getRange(int start, int rangeLength) => |
| 425 Lists.getRange(this, start, rangeLength, <Map>[]); |
| 426 |
| 427 // -- end List<Map> mixins. |
| 428 |
| 429 @DomName('SQLResultSetRowList.item') |
| 430 @DocsEditable |
| 431 Map item(int index) native "SQLResultSetRowList_item_Callback"; |
| 432 |
| 433 } |
| 434 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 435 // for details. All rights reserved. Use of this source code is governed by a |
| 436 // BSD-style license that can be found in the LICENSE file. |
| 437 |
| 438 // WARNING: Do not edit - generated code. |
| 439 |
| 440 |
| 441 @DocsEditable |
| 442 @DomName('SQLTransaction') |
| 443 @SupportedBrowser(SupportedBrowser.CHROME) |
| 444 @SupportedBrowser(SupportedBrowser.SAFARI) |
| 445 @Experimental |
| 446 class SqlTransaction extends NativeFieldWrapperClass1 { |
| 447 SqlTransaction.internal(); |
| 448 |
| 449 @DomName('SQLTransaction.executeSql') |
| 450 @DocsEditable |
| 451 void executeSql(String sqlStatement, List arguments, [SqlStatementCallback cal
lback, SqlStatementErrorCallback errorCallback]) native "SQLTransaction_executeS
ql_Callback"; |
| 452 |
| 453 } |
| 454 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 455 // for details. All rights reserved. Use of this source code is governed by a |
| 456 // BSD-style license that can be found in the LICENSE file. |
| 457 |
| 458 // WARNING: Do not edit - generated code. |
| 459 |
| 460 |
| 461 @DocsEditable |
| 462 @DomName('SQLTransactionSync') |
| 463 @SupportedBrowser(SupportedBrowser.CHROME) |
| 464 @SupportedBrowser(SupportedBrowser.SAFARI) |
| 465 @Experimental |
| 466 class SqlTransactionSync extends NativeFieldWrapperClass1 { |
| 467 SqlTransactionSync.internal(); |
| 468 |
| 469 @DomName('SQLTransactionSync.executeSql') |
| 470 @DocsEditable |
| 471 SqlResultSet executeSql(String sqlStatement, List arguments) native "SQLTransa
ctionSync_executeSql_Callback"; |
| 472 |
| 473 } |
| OLD | NEW |