| OLD | NEW |
| 1 library indexed_db; | 1 library indexed_db; |
| 2 | 2 |
| 3 import 'dart:async'; | 3 import 'dart:async'; |
| 4 import 'dart:html'; | 4 import 'dart:html'; |
| 5 import 'dart:html_common'; | 5 import 'dart:html_common'; |
| 6 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 6 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 7 // for details. All rights reserved. Use of this source code is governed by a | 7 // for details. All rights reserved. Use of this source code is governed by a |
| 8 // BSD-style license that can be found in the LICENSE file. | 8 // BSD-style license that can be found in the LICENSE file. |
| 9 | 9 |
| 10 // DO NOT EDIT | 10 // DO NOT EDIT |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 131 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 132 // for details. All rights reserved. Use of this source code is governed by a | 132 // for details. All rights reserved. Use of this source code is governed by a |
| 133 // BSD-style license that can be found in the LICENSE file. | 133 // BSD-style license that can be found in the LICENSE file. |
| 134 | 134 |
| 135 | 135 |
| 136 | 136 |
| 137 @DocsEditable | 137 @DocsEditable |
| 138 @DomName('IDBCursor') | 138 @DomName('IDBCursor') |
| 139 class Cursor native "*IDBCursor" { | 139 class Cursor native "*IDBCursor" { |
| 140 | 140 |
| 141 @DocsEditable @DomName('IDBCursor.direction') | 141 @DocsEditable |
| 142 @DomName('IDBCursor.direction') |
| 142 final String direction; | 143 final String direction; |
| 143 | 144 |
| 144 @DocsEditable @DomName('IDBCursor.key') @_annotation_Creates_IDBKey @_annotati
on_Returns_IDBKey | 145 @DocsEditable |
| 146 @DomName('IDBCursor.key') |
| 147 @_annotation_Creates_IDBKey |
| 148 @_annotation_Returns_IDBKey |
| 145 final Object key; | 149 final Object key; |
| 146 | 150 |
| 147 @DocsEditable @DomName('IDBCursor.primaryKey') | 151 @DocsEditable |
| 152 @DomName('IDBCursor.primaryKey') |
| 148 final Object primaryKey; | 153 final Object primaryKey; |
| 149 | 154 |
| 150 @DocsEditable @DomName('IDBCursor.source') | 155 @DocsEditable |
| 156 @DomName('IDBCursor.source') |
| 151 final dynamic source; | 157 final dynamic source; |
| 152 | 158 |
| 153 @DocsEditable @DomName('IDBCursor.advance') | 159 @DocsEditable |
| 160 @DomName('IDBCursor.advance') |
| 154 void advance(int count) native; | 161 void advance(int count) native; |
| 155 | 162 |
| 156 void continueFunction([/*IDBKey*/ key]) { | 163 void continueFunction([/*IDBKey*/ key]) { |
| 157 if (?key) { | 164 if (?key) { |
| 158 var key_1 = _convertDartToNative_IDBKey(key); | 165 var key_1 = _convertDartToNative_IDBKey(key); |
| 159 _continueFunction_1(key_1); | 166 _continueFunction_1(key_1); |
| 160 return; | 167 return; |
| 161 } | 168 } |
| 162 _continueFunction_2(); | 169 _continueFunction_2(); |
| 163 return; | 170 return; |
| 164 } | 171 } |
| 165 @JSName('continue') | 172 @JSName('continue') |
| 166 @DocsEditable @DomName('IDBCursor.continue') | 173 @DocsEditable |
| 174 @DomName('IDBCursor.continue') |
| 167 void _continueFunction_1(key) native; | 175 void _continueFunction_1(key) native; |
| 168 @JSName('continue') | 176 @JSName('continue') |
| 169 @DocsEditable @DomName('IDBCursor.continue') | 177 @DocsEditable |
| 178 @DomName('IDBCursor.continue') |
| 170 void _continueFunction_2() native; | 179 void _continueFunction_2() native; |
| 171 | 180 |
| 172 @DocsEditable @DomName('IDBCursor.delete') | 181 @DocsEditable |
| 182 @DomName('IDBCursor.delete') |
| 173 Request delete() native; | 183 Request delete() native; |
| 174 | 184 |
| 175 Request update(/*any*/ value) { | 185 Request update(/*any*/ value) { |
| 176 var value_1 = convertDartToNative_SerializedScriptValue(value); | 186 var value_1 = convertDartToNative_SerializedScriptValue(value); |
| 177 return _update_1(value_1); | 187 return _update_1(value_1); |
| 178 } | 188 } |
| 179 @JSName('update') | 189 @JSName('update') |
| 180 @DocsEditable @DomName('IDBCursor.update') | 190 @DocsEditable |
| 191 @DomName('IDBCursor.update') |
| 181 Request _update_1(value) native; | 192 Request _update_1(value) native; |
| 182 } | 193 } |
| 183 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 194 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 184 // for details. All rights reserved. Use of this source code is governed by a | 195 // for details. All rights reserved. Use of this source code is governed by a |
| 185 // BSD-style license that can be found in the LICENSE file. | 196 // BSD-style license that can be found in the LICENSE file. |
| 186 | 197 |
| 187 | 198 |
| 188 | 199 |
| 189 @DocsEditable | 200 @DocsEditable |
| 190 @DomName('IDBCursorWithValue') | 201 @DomName('IDBCursorWithValue') |
| 191 class CursorWithValue extends Cursor native "*IDBCursorWithValue" { | 202 class CursorWithValue extends Cursor native "*IDBCursorWithValue" { |
| 192 | 203 |
| 193 @DocsEditable @DomName('IDBCursorWithValue.value') @annotation_Creates_Seriali
zedScriptValue @annotation_Returns_SerializedScriptValue | 204 @DocsEditable |
| 205 @DomName('IDBCursorWithValue.value') |
| 206 @annotation_Creates_SerializedScriptValue |
| 207 @annotation_Returns_SerializedScriptValue |
| 194 final Object value; | 208 final Object value; |
| 195 } | 209 } |
| 196 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 210 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 197 // for details. All rights reserved. Use of this source code is governed by a | 211 // for details. All rights reserved. Use of this source code is governed by a |
| 198 // BSD-style license that can be found in the LICENSE file. | 212 // BSD-style license that can be found in the LICENSE file. |
| 199 | 213 |
| 200 | 214 |
| 201 @DocsEditable | 215 @DocsEditable |
| 202 @DomName('IDBDatabase') | 216 @DomName('IDBDatabase') |
| 203 @SupportedBrowser(SupportedBrowser.CHROME) | 217 @SupportedBrowser(SupportedBrowser.CHROME) |
| (...skipping 24 matching lines...) Expand all Loading... |
| 228 | 242 |
| 229 static const EventStreamProvider<Event> errorEvent = const EventStreamProvider
<Event>('error'); | 243 static const EventStreamProvider<Event> errorEvent = const EventStreamProvider
<Event>('error'); |
| 230 | 244 |
| 231 static const EventStreamProvider<UpgradeNeededEvent> versionChangeEvent = cons
t EventStreamProvider<UpgradeNeededEvent>('versionchange'); | 245 static const EventStreamProvider<UpgradeNeededEvent> versionChangeEvent = cons
t EventStreamProvider<UpgradeNeededEvent>('versionchange'); |
| 232 | 246 |
| 233 @DocsEditable | 247 @DocsEditable |
| 234 @DomName('EventTarget.addEventListener, EventTarget.removeEventListener, Event
Target.dispatchEvent') | 248 @DomName('EventTarget.addEventListener, EventTarget.removeEventListener, Event
Target.dispatchEvent') |
| 235 DatabaseEvents get on => | 249 DatabaseEvents get on => |
| 236 new DatabaseEvents(this); | 250 new DatabaseEvents(this); |
| 237 | 251 |
| 238 @DocsEditable @DomName('IDBDatabase.name') | 252 @DocsEditable |
| 253 @DomName('IDBDatabase.name') |
| 239 final String name; | 254 final String name; |
| 240 | 255 |
| 241 @DocsEditable @DomName('IDBDatabase.objectStoreNames') | 256 @DocsEditable |
| 242 @Returns('DomStringList') @Creates('DomStringList') | 257 @DomName('IDBDatabase.objectStoreNames') |
| 258 @Returns('DomStringList') |
| 259 @Creates('DomStringList') |
| 243 final List<String> objectStoreNames; | 260 final List<String> objectStoreNames; |
| 244 | 261 |
| 245 @DocsEditable @DomName('IDBDatabase.version') | 262 @DocsEditable |
| 263 @DomName('IDBDatabase.version') |
| 246 final dynamic version; | 264 final dynamic version; |
| 247 | 265 |
| 248 @JSName('addEventListener') | 266 @JSName('addEventListener') |
| 249 @DocsEditable @DomName('IDBDatabase.addEventListener') | 267 @DocsEditable |
| 268 @DomName('IDBDatabase.addEventListener') |
| 250 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native; | 269 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native; |
| 251 | 270 |
| 252 @DocsEditable @DomName('IDBDatabase.close') | 271 @DocsEditable |
| 272 @DomName('IDBDatabase.close') |
| 253 void close() native; | 273 void close() native; |
| 254 | 274 |
| 255 ObjectStore createObjectStore(String name, [Map options]) { | 275 ObjectStore createObjectStore(String name, [Map options]) { |
| 256 if (?options) { | 276 if (?options) { |
| 257 var options_1 = convertDartToNative_Dictionary(options); | 277 var options_1 = convertDartToNative_Dictionary(options); |
| 258 return _createObjectStore_1(name, options_1); | 278 return _createObjectStore_1(name, options_1); |
| 259 } | 279 } |
| 260 return _createObjectStore_2(name); | 280 return _createObjectStore_2(name); |
| 261 } | 281 } |
| 262 @JSName('createObjectStore') | 282 @JSName('createObjectStore') |
| 263 @DocsEditable @DomName('IDBDatabase.createObjectStore') | 283 @DocsEditable |
| 284 @DomName('IDBDatabase.createObjectStore') |
| 264 ObjectStore _createObjectStore_1(name, options) native; | 285 ObjectStore _createObjectStore_1(name, options) native; |
| 265 @JSName('createObjectStore') | 286 @JSName('createObjectStore') |
| 266 @DocsEditable @DomName('IDBDatabase.createObjectStore') | 287 @DocsEditable |
| 288 @DomName('IDBDatabase.createObjectStore') |
| 267 ObjectStore _createObjectStore_2(name) native; | 289 ObjectStore _createObjectStore_2(name) native; |
| 268 | 290 |
| 269 @DocsEditable @DomName('IDBDatabase.deleteObjectStore') | 291 @DocsEditable |
| 292 @DomName('IDBDatabase.deleteObjectStore') |
| 270 void deleteObjectStore(String name) native; | 293 void deleteObjectStore(String name) native; |
| 271 | 294 |
| 272 @JSName('dispatchEvent') | 295 @JSName('dispatchEvent') |
| 273 @DocsEditable @DomName('IDBDatabase.dispatchEvent') | 296 @DocsEditable |
| 297 @DomName('IDBDatabase.dispatchEvent') |
| 274 bool $dom_dispatchEvent(Event evt) native; | 298 bool $dom_dispatchEvent(Event evt) native; |
| 275 | 299 |
| 276 @JSName('removeEventListener') | 300 @JSName('removeEventListener') |
| 277 @DocsEditable @DomName('IDBDatabase.removeEventListener') | 301 @DocsEditable |
| 302 @DomName('IDBDatabase.removeEventListener') |
| 278 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native; | 303 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native; |
| 279 | 304 |
| 280 Stream<Event> get onAbort => abortEvent.forTarget(this); | 305 Stream<Event> get onAbort => abortEvent.forTarget(this); |
| 281 | 306 |
| 282 Stream<Event> get onError => errorEvent.forTarget(this); | 307 Stream<Event> get onError => errorEvent.forTarget(this); |
| 283 | 308 |
| 284 Stream<UpgradeNeededEvent> get onVersionChange => versionChangeEvent.forTarget
(this); | 309 Stream<UpgradeNeededEvent> get onVersionChange => versionChangeEvent.forTarget
(this); |
| 285 } | 310 } |
| 286 | 311 |
| 287 @DocsEditable | 312 @DocsEditable |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 'window.mozIndexedDB)'); | 345 'window.mozIndexedDB)'); |
| 321 } | 346 } |
| 322 | 347 |
| 323 | 348 |
| 324 int cmp(/*IDBKey*/ first, /*IDBKey*/ second) { | 349 int cmp(/*IDBKey*/ first, /*IDBKey*/ second) { |
| 325 var first_1 = _convertDartToNative_IDBKey(first); | 350 var first_1 = _convertDartToNative_IDBKey(first); |
| 326 var second_2 = _convertDartToNative_IDBKey(second); | 351 var second_2 = _convertDartToNative_IDBKey(second); |
| 327 return _cmp_1(first_1, second_2); | 352 return _cmp_1(first_1, second_2); |
| 328 } | 353 } |
| 329 @JSName('cmp') | 354 @JSName('cmp') |
| 330 @DocsEditable @DomName('IDBFactory.cmp') | 355 @DocsEditable |
| 356 @DomName('IDBFactory.cmp') |
| 331 int _cmp_1(first, second) native; | 357 int _cmp_1(first, second) native; |
| 332 | 358 |
| 333 @DocsEditable @DomName('IDBFactory.deleteDatabase') | 359 @DocsEditable |
| 360 @DomName('IDBFactory.deleteDatabase') |
| 334 VersionChangeRequest deleteDatabase(String name) native; | 361 VersionChangeRequest deleteDatabase(String name) native; |
| 335 | 362 |
| 336 @DocsEditable @DomName('IDBFactory.open') @Returns('Request') @Creates('Reques
t') @Creates('Database') | 363 @DocsEditable |
| 364 @DomName('IDBFactory.open') |
| 337 OpenDBRequest open(String name, [int version]) native; | 365 OpenDBRequest open(String name, [int version]) native; |
| 338 | 366 |
| 339 @DocsEditable @DomName('IDBFactory.webkitGetDatabaseNames') | 367 @DocsEditable |
| 368 @DomName('IDBFactory.webkitGetDatabaseNames') |
| 340 Request webkitGetDatabaseNames() native; | 369 Request webkitGetDatabaseNames() native; |
| 341 | 370 |
| 342 } | 371 } |
| 343 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 372 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 344 // for details. All rights reserved. Use of this source code is governed by a | 373 // for details. All rights reserved. Use of this source code is governed by a |
| 345 // BSD-style license that can be found in the LICENSE file. | 374 // BSD-style license that can be found in the LICENSE file. |
| 346 | 375 |
| 347 | 376 |
| 348 | 377 |
| 349 @DocsEditable | 378 @DocsEditable |
| 350 @DomName('IDBIndex') | 379 @DomName('IDBIndex') |
| 351 class Index native "*IDBIndex" { | 380 class Index native "*IDBIndex" { |
| 352 | 381 |
| 353 @DocsEditable @DomName('IDBIndex.keyPath') | 382 @DocsEditable |
| 383 @DomName('IDBIndex.keyPath') |
| 354 final dynamic keyPath; | 384 final dynamic keyPath; |
| 355 | 385 |
| 356 @DocsEditable @DomName('IDBIndex.multiEntry') | 386 @DocsEditable |
| 387 @DomName('IDBIndex.multiEntry') |
| 357 final bool multiEntry; | 388 final bool multiEntry; |
| 358 | 389 |
| 359 @DocsEditable @DomName('IDBIndex.name') | 390 @DocsEditable |
| 391 @DomName('IDBIndex.name') |
| 360 final String name; | 392 final String name; |
| 361 | 393 |
| 362 @DocsEditable @DomName('IDBIndex.objectStore') | 394 @DocsEditable |
| 395 @DomName('IDBIndex.objectStore') |
| 363 final ObjectStore objectStore; | 396 final ObjectStore objectStore; |
| 364 | 397 |
| 365 @DocsEditable @DomName('IDBIndex.unique') | 398 @DocsEditable |
| 399 @DomName('IDBIndex.unique') |
| 366 final bool unique; | 400 final bool unique; |
| 367 | 401 |
| 368 Request count([key_OR_range]) { | 402 Request count([key_OR_range]) { |
| 369 if (!?key_OR_range) { | 403 if (!?key_OR_range) { |
| 370 return _count_1(); | 404 return _count_1(); |
| 371 } | 405 } |
| 372 if ((key_OR_range is KeyRange || key_OR_range == null)) { | 406 if ((key_OR_range is KeyRange || key_OR_range == null)) { |
| 373 return _count_2(key_OR_range); | 407 return _count_2(key_OR_range); |
| 374 } | 408 } |
| 375 if (?key_OR_range) { | 409 if (?key_OR_range) { |
| 376 var key_1 = _convertDartToNative_IDBKey(key_OR_range); | 410 var key_1 = _convertDartToNative_IDBKey(key_OR_range); |
| 377 return _count_3(key_1); | 411 return _count_3(key_1); |
| 378 } | 412 } |
| 379 throw new ArgumentError("Incorrect number or type of arguments"); | 413 throw new ArgumentError("Incorrect number or type of arguments"); |
| 380 } | 414 } |
| 381 @JSName('count') | 415 @JSName('count') |
| 382 @DocsEditable @DomName('IDBIndex.count') | 416 @DocsEditable |
| 417 @DomName('IDBIndex.count') |
| 383 Request _count_1() native; | 418 Request _count_1() native; |
| 384 @JSName('count') | 419 @JSName('count') |
| 385 @DocsEditable @DomName('IDBIndex.count') | 420 @DocsEditable |
| 421 @DomName('IDBIndex.count') |
| 386 Request _count_2(KeyRange range) native; | 422 Request _count_2(KeyRange range) native; |
| 387 @JSName('count') | 423 @JSName('count') |
| 388 @DocsEditable @DomName('IDBIndex.count') | 424 @DocsEditable |
| 425 @DomName('IDBIndex.count') |
| 389 Request _count_3(key) native; | 426 Request _count_3(key) native; |
| 390 | 427 |
| 391 Request get(key) { | 428 Request get(key) { |
| 392 if ((key is KeyRange || key == null)) { | 429 if ((key is KeyRange || key == null)) { |
| 393 return _get_1(key); | 430 return _get_1(key); |
| 394 } | 431 } |
| 395 if (?key) { | 432 if (?key) { |
| 396 var key_1 = _convertDartToNative_IDBKey(key); | 433 var key_1 = _convertDartToNative_IDBKey(key); |
| 397 return _get_2(key_1); | 434 return _get_2(key_1); |
| 398 } | 435 } |
| 399 throw new ArgumentError("Incorrect number or type of arguments"); | 436 throw new ArgumentError("Incorrect number or type of arguments"); |
| 400 } | 437 } |
| 401 @JSName('get') | 438 @JSName('get') |
| 402 @DocsEditable @DomName('IDBIndex.get') @Returns('Request') @Creates('Request')
@annotation_Creates_SerializedScriptValue | 439 @DocsEditable |
| 440 @DomName('IDBIndex.get') |
| 403 Request _get_1(KeyRange key) native; | 441 Request _get_1(KeyRange key) native; |
| 404 @JSName('get') | 442 @JSName('get') |
| 405 @DocsEditable @DomName('IDBIndex.get') @Returns('Request') @Creates('Request')
@annotation_Creates_SerializedScriptValue | 443 @DocsEditable |
| 444 @DomName('IDBIndex.get') |
| 406 Request _get_2(key) native; | 445 Request _get_2(key) native; |
| 407 | 446 |
| 408 Request getKey(key) { | 447 Request getKey(key) { |
| 409 if ((key is KeyRange || key == null)) { | 448 if ((key is KeyRange || key == null)) { |
| 410 return _getKey_1(key); | 449 return _getKey_1(key); |
| 411 } | 450 } |
| 412 if (?key) { | 451 if (?key) { |
| 413 var key_1 = _convertDartToNative_IDBKey(key); | 452 var key_1 = _convertDartToNative_IDBKey(key); |
| 414 return _getKey_2(key_1); | 453 return _getKey_2(key_1); |
| 415 } | 454 } |
| 416 throw new ArgumentError("Incorrect number or type of arguments"); | 455 throw new ArgumentError("Incorrect number or type of arguments"); |
| 417 } | 456 } |
| 418 @JSName('getKey') | 457 @JSName('getKey') |
| 419 @DocsEditable @DomName('IDBIndex.getKey') @Returns('Request') @Creates('Reques
t') @annotation_Creates_SerializedScriptValue @Creates('ObjectStore') | 458 @DocsEditable |
| 459 @DomName('IDBIndex.getKey') |
| 420 Request _getKey_1(KeyRange key) native; | 460 Request _getKey_1(KeyRange key) native; |
| 421 @JSName('getKey') | 461 @JSName('getKey') |
| 422 @DocsEditable @DomName('IDBIndex.getKey') @Returns('Request') @Creates('Reques
t') @annotation_Creates_SerializedScriptValue @Creates('ObjectStore') | 462 @DocsEditable |
| 463 @DomName('IDBIndex.getKey') |
| 423 Request _getKey_2(key) native; | 464 Request _getKey_2(key) native; |
| 424 | 465 |
| 425 Request openCursor([key_OR_range, String direction]) { | 466 Request openCursor([key_OR_range, String direction]) { |
| 426 if (!?key_OR_range && | 467 if (!?key_OR_range && |
| 427 !?direction) { | 468 !?direction) { |
| 428 return _openCursor_1(); | 469 return _openCursor_1(); |
| 429 } | 470 } |
| 430 if ((key_OR_range is KeyRange || key_OR_range == null) && | 471 if ((key_OR_range is KeyRange || key_OR_range == null) && |
| 431 !?direction) { | 472 !?direction) { |
| 432 return _openCursor_2(key_OR_range); | 473 return _openCursor_2(key_OR_range); |
| 433 } | 474 } |
| 434 if ((key_OR_range is KeyRange || key_OR_range == null)) { | 475 if ((key_OR_range is KeyRange || key_OR_range == null)) { |
| 435 return _openCursor_3(key_OR_range, direction); | 476 return _openCursor_3(key_OR_range, direction); |
| 436 } | 477 } |
| 437 if (?key_OR_range && | 478 if (?key_OR_range && |
| 438 !?direction) { | 479 !?direction) { |
| 439 var key_1 = _convertDartToNative_IDBKey(key_OR_range); | 480 var key_1 = _convertDartToNative_IDBKey(key_OR_range); |
| 440 return _openCursor_4(key_1); | 481 return _openCursor_4(key_1); |
| 441 } | 482 } |
| 442 if (?key_OR_range) { | 483 if (?key_OR_range) { |
| 443 var key_2 = _convertDartToNative_IDBKey(key_OR_range); | 484 var key_2 = _convertDartToNative_IDBKey(key_OR_range); |
| 444 return _openCursor_5(key_2, direction); | 485 return _openCursor_5(key_2, direction); |
| 445 } | 486 } |
| 446 throw new ArgumentError("Incorrect number or type of arguments"); | 487 throw new ArgumentError("Incorrect number or type of arguments"); |
| 447 } | 488 } |
| 448 @JSName('openCursor') | 489 @JSName('openCursor') |
| 449 @DocsEditable @DomName('IDBIndex.openCursor') @Returns('Request') @Creates('Re
quest') @Creates('Cursor') | 490 @DocsEditable |
| 491 @DomName('IDBIndex.openCursor') |
| 450 Request _openCursor_1() native; | 492 Request _openCursor_1() native; |
| 451 @JSName('openCursor') | 493 @JSName('openCursor') |
| 452 @DocsEditable @DomName('IDBIndex.openCursor') @Returns('Request') @Creates('Re
quest') @Creates('Cursor') | 494 @DocsEditable |
| 495 @DomName('IDBIndex.openCursor') |
| 453 Request _openCursor_2(KeyRange range) native; | 496 Request _openCursor_2(KeyRange range) native; |
| 454 @JSName('openCursor') | 497 @JSName('openCursor') |
| 455 @DocsEditable @DomName('IDBIndex.openCursor') @Returns('Request') @Creates('Re
quest') @Creates('Cursor') | 498 @DocsEditable |
| 499 @DomName('IDBIndex.openCursor') |
| 456 Request _openCursor_3(KeyRange range, direction) native; | 500 Request _openCursor_3(KeyRange range, direction) native; |
| 457 @JSName('openCursor') | 501 @JSName('openCursor') |
| 458 @DocsEditable @DomName('IDBIndex.openCursor') @Returns('Request') @Creates('Re
quest') @Creates('Cursor') | 502 @DocsEditable |
| 503 @DomName('IDBIndex.openCursor') |
| 459 Request _openCursor_4(key) native; | 504 Request _openCursor_4(key) native; |
| 460 @JSName('openCursor') | 505 @JSName('openCursor') |
| 461 @DocsEditable @DomName('IDBIndex.openCursor') @Returns('Request') @Creates('Re
quest') @Creates('Cursor') | 506 @DocsEditable |
| 507 @DomName('IDBIndex.openCursor') |
| 462 Request _openCursor_5(key, direction) native; | 508 Request _openCursor_5(key, direction) native; |
| 463 | 509 |
| 464 Request openKeyCursor([key_OR_range, String direction]) { | 510 Request openKeyCursor([key_OR_range, String direction]) { |
| 465 if (!?key_OR_range && | 511 if (!?key_OR_range && |
| 466 !?direction) { | 512 !?direction) { |
| 467 return _openKeyCursor_1(); | 513 return _openKeyCursor_1(); |
| 468 } | 514 } |
| 469 if ((key_OR_range is KeyRange || key_OR_range == null) && | 515 if ((key_OR_range is KeyRange || key_OR_range == null) && |
| 470 !?direction) { | 516 !?direction) { |
| 471 return _openKeyCursor_2(key_OR_range); | 517 return _openKeyCursor_2(key_OR_range); |
| 472 } | 518 } |
| 473 if ((key_OR_range is KeyRange || key_OR_range == null)) { | 519 if ((key_OR_range is KeyRange || key_OR_range == null)) { |
| 474 return _openKeyCursor_3(key_OR_range, direction); | 520 return _openKeyCursor_3(key_OR_range, direction); |
| 475 } | 521 } |
| 476 if (?key_OR_range && | 522 if (?key_OR_range && |
| 477 !?direction) { | 523 !?direction) { |
| 478 var key_1 = _convertDartToNative_IDBKey(key_OR_range); | 524 var key_1 = _convertDartToNative_IDBKey(key_OR_range); |
| 479 return _openKeyCursor_4(key_1); | 525 return _openKeyCursor_4(key_1); |
| 480 } | 526 } |
| 481 if (?key_OR_range) { | 527 if (?key_OR_range) { |
| 482 var key_2 = _convertDartToNative_IDBKey(key_OR_range); | 528 var key_2 = _convertDartToNative_IDBKey(key_OR_range); |
| 483 return _openKeyCursor_5(key_2, direction); | 529 return _openKeyCursor_5(key_2, direction); |
| 484 } | 530 } |
| 485 throw new ArgumentError("Incorrect number or type of arguments"); | 531 throw new ArgumentError("Incorrect number or type of arguments"); |
| 486 } | 532 } |
| 487 @JSName('openKeyCursor') | 533 @JSName('openKeyCursor') |
| 488 @DocsEditable @DomName('IDBIndex.openKeyCursor') @Returns('Request') @Creates(
'Request') @Creates('Cursor') | 534 @DocsEditable |
| 535 @DomName('IDBIndex.openKeyCursor') |
| 489 Request _openKeyCursor_1() native; | 536 Request _openKeyCursor_1() native; |
| 490 @JSName('openKeyCursor') | 537 @JSName('openKeyCursor') |
| 491 @DocsEditable @DomName('IDBIndex.openKeyCursor') @Returns('Request') @Creates(
'Request') @Creates('Cursor') | 538 @DocsEditable |
| 539 @DomName('IDBIndex.openKeyCursor') |
| 492 Request _openKeyCursor_2(KeyRange range) native; | 540 Request _openKeyCursor_2(KeyRange range) native; |
| 493 @JSName('openKeyCursor') | 541 @JSName('openKeyCursor') |
| 494 @DocsEditable @DomName('IDBIndex.openKeyCursor') @Returns('Request') @Creates(
'Request') @Creates('Cursor') | 542 @DocsEditable |
| 543 @DomName('IDBIndex.openKeyCursor') |
| 495 Request _openKeyCursor_3(KeyRange range, direction) native; | 544 Request _openKeyCursor_3(KeyRange range, direction) native; |
| 496 @JSName('openKeyCursor') | 545 @JSName('openKeyCursor') |
| 497 @DocsEditable @DomName('IDBIndex.openKeyCursor') @Returns('Request') @Creates(
'Request') @Creates('Cursor') | 546 @DocsEditable |
| 547 @DomName('IDBIndex.openKeyCursor') |
| 498 Request _openKeyCursor_4(key) native; | 548 Request _openKeyCursor_4(key) native; |
| 499 @JSName('openKeyCursor') | 549 @JSName('openKeyCursor') |
| 500 @DocsEditable @DomName('IDBIndex.openKeyCursor') @Returns('Request') @Creates(
'Request') @Creates('Cursor') | 550 @DocsEditable |
| 551 @DomName('IDBIndex.openKeyCursor') |
| 501 Request _openKeyCursor_5(key, direction) native; | 552 Request _openKeyCursor_5(key, direction) native; |
| 502 } | 553 } |
| 503 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 554 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 504 // for details. All rights reserved. Use of this source code is governed by a | 555 // for details. All rights reserved. Use of this source code is governed by a |
| 505 // BSD-style license that can be found in the LICENSE file. | 556 // BSD-style license that can be found in the LICENSE file. |
| 506 | 557 |
| 507 | 558 |
| 508 | 559 |
| 509 @DocsEditable | 560 @DocsEditable |
| 510 @DomName('IDBKey') | 561 @DomName('IDBKey') |
| (...skipping 21 matching lines...) Expand all Loading... |
| 532 | 583 |
| 533 @DomName('KeyRange.bound') | 584 @DomName('KeyRange.bound') |
| 534 factory KeyRange.bound(/*Key*/ lower, /*Key*/ upper, | 585 factory KeyRange.bound(/*Key*/ lower, /*Key*/ upper, |
| 535 [bool lowerOpen = false, bool upperOpen = false]) => | 586 [bool lowerOpen = false, bool upperOpen = false]) => |
| 536 _KeyRangeFactoryProvider.createKeyRange_bound( | 587 _KeyRangeFactoryProvider.createKeyRange_bound( |
| 537 lower, upper, lowerOpen, upperOpen); | 588 lower, upper, lowerOpen, upperOpen); |
| 538 | 589 |
| 539 | 590 |
| 540 dynamic get lower => _convertNativeToDart_IDBKey(this._lower); | 591 dynamic get lower => _convertNativeToDart_IDBKey(this._lower); |
| 541 @JSName('lower') | 592 @JSName('lower') |
| 542 @DocsEditable @DomName('IDBKeyRange.lower') | 593 @DocsEditable |
| 594 @DomName('IDBKeyRange.lower') |
| 543 final dynamic _lower; | 595 final dynamic _lower; |
| 544 | 596 |
| 545 @DocsEditable @DomName('IDBKeyRange.lowerOpen') | 597 @DocsEditable |
| 598 @DomName('IDBKeyRange.lowerOpen') |
| 546 final bool lowerOpen; | 599 final bool lowerOpen; |
| 547 | 600 |
| 548 dynamic get upper => _convertNativeToDart_IDBKey(this._upper); | 601 dynamic get upper => _convertNativeToDart_IDBKey(this._upper); |
| 549 @JSName('upper') | 602 @JSName('upper') |
| 550 @DocsEditable @DomName('IDBKeyRange.upper') | 603 @DocsEditable |
| 604 @DomName('IDBKeyRange.upper') |
| 551 final dynamic _upper; | 605 final dynamic _upper; |
| 552 | 606 |
| 553 @DocsEditable @DomName('IDBKeyRange.upperOpen') | 607 @DocsEditable |
| 608 @DomName('IDBKeyRange.upperOpen') |
| 554 final bool upperOpen; | 609 final bool upperOpen; |
| 555 | 610 |
| 556 static KeyRange bound_(/*IDBKey*/ lower, /*IDBKey*/ upper, [bool lowerOpen, bo
ol upperOpen]) { | 611 static KeyRange bound_(/*IDBKey*/ lower, /*IDBKey*/ upper, [bool lowerOpen, bo
ol upperOpen]) { |
| 557 if (?upperOpen) { | 612 if (?upperOpen) { |
| 558 var lower_1 = _convertDartToNative_IDBKey(lower); | 613 var lower_1 = _convertDartToNative_IDBKey(lower); |
| 559 var upper_2 = _convertDartToNative_IDBKey(upper); | 614 var upper_2 = _convertDartToNative_IDBKey(upper); |
| 560 return _bound__1(lower_1, upper_2, lowerOpen, upperOpen); | 615 return _bound__1(lower_1, upper_2, lowerOpen, upperOpen); |
| 561 } | 616 } |
| 562 if (?lowerOpen) { | 617 if (?lowerOpen) { |
| 563 var lower_3 = _convertDartToNative_IDBKey(lower); | 618 var lower_3 = _convertDartToNative_IDBKey(lower); |
| 564 var upper_4 = _convertDartToNative_IDBKey(upper); | 619 var upper_4 = _convertDartToNative_IDBKey(upper); |
| 565 return _bound__2(lower_3, upper_4, lowerOpen); | 620 return _bound__2(lower_3, upper_4, lowerOpen); |
| 566 } | 621 } |
| 567 var lower_5 = _convertDartToNative_IDBKey(lower); | 622 var lower_5 = _convertDartToNative_IDBKey(lower); |
| 568 var upper_6 = _convertDartToNative_IDBKey(upper); | 623 var upper_6 = _convertDartToNative_IDBKey(upper); |
| 569 return _bound__3(lower_5, upper_6); | 624 return _bound__3(lower_5, upper_6); |
| 570 } | 625 } |
| 571 @JSName('bound') | 626 @JSName('bound') |
| 572 @DocsEditable @DomName('IDBKeyRange.bound') | 627 @DocsEditable |
| 628 @DomName('IDBKeyRange.bound') |
| 573 static KeyRange _bound__1(lower, upper, lowerOpen, upperOpen) native; | 629 static KeyRange _bound__1(lower, upper, lowerOpen, upperOpen) native; |
| 574 @JSName('bound') | 630 @JSName('bound') |
| 575 @DocsEditable @DomName('IDBKeyRange.bound') | 631 @DocsEditable |
| 632 @DomName('IDBKeyRange.bound') |
| 576 static KeyRange _bound__2(lower, upper, lowerOpen) native; | 633 static KeyRange _bound__2(lower, upper, lowerOpen) native; |
| 577 @JSName('bound') | 634 @JSName('bound') |
| 578 @DocsEditable @DomName('IDBKeyRange.bound') | 635 @DocsEditable |
| 636 @DomName('IDBKeyRange.bound') |
| 579 static KeyRange _bound__3(lower, upper) native; | 637 static KeyRange _bound__3(lower, upper) native; |
| 580 | 638 |
| 581 static KeyRange lowerBound_(/*IDBKey*/ bound, [bool open]) { | 639 static KeyRange lowerBound_(/*IDBKey*/ bound, [bool open]) { |
| 582 if (?open) { | 640 if (?open) { |
| 583 var bound_1 = _convertDartToNative_IDBKey(bound); | 641 var bound_1 = _convertDartToNative_IDBKey(bound); |
| 584 return _lowerBound__1(bound_1, open); | 642 return _lowerBound__1(bound_1, open); |
| 585 } | 643 } |
| 586 var bound_2 = _convertDartToNative_IDBKey(bound); | 644 var bound_2 = _convertDartToNative_IDBKey(bound); |
| 587 return _lowerBound__2(bound_2); | 645 return _lowerBound__2(bound_2); |
| 588 } | 646 } |
| 589 @JSName('lowerBound') | 647 @JSName('lowerBound') |
| 590 @DocsEditable @DomName('IDBKeyRange.lowerBound') | 648 @DocsEditable |
| 649 @DomName('IDBKeyRange.lowerBound') |
| 591 static KeyRange _lowerBound__1(bound, open) native; | 650 static KeyRange _lowerBound__1(bound, open) native; |
| 592 @JSName('lowerBound') | 651 @JSName('lowerBound') |
| 593 @DocsEditable @DomName('IDBKeyRange.lowerBound') | 652 @DocsEditable |
| 653 @DomName('IDBKeyRange.lowerBound') |
| 594 static KeyRange _lowerBound__2(bound) native; | 654 static KeyRange _lowerBound__2(bound) native; |
| 595 | 655 |
| 596 static KeyRange only_(/*IDBKey*/ value) { | 656 static KeyRange only_(/*IDBKey*/ value) { |
| 597 var value_1 = _convertDartToNative_IDBKey(value); | 657 var value_1 = _convertDartToNative_IDBKey(value); |
| 598 return _only__1(value_1); | 658 return _only__1(value_1); |
| 599 } | 659 } |
| 600 @JSName('only') | 660 @JSName('only') |
| 601 @DocsEditable @DomName('IDBKeyRange.only') | 661 @DocsEditable |
| 662 @DomName('IDBKeyRange.only') |
| 602 static KeyRange _only__1(value) native; | 663 static KeyRange _only__1(value) native; |
| 603 | 664 |
| 604 static KeyRange upperBound_(/*IDBKey*/ bound, [bool open]) { | 665 static KeyRange upperBound_(/*IDBKey*/ bound, [bool open]) { |
| 605 if (?open) { | 666 if (?open) { |
| 606 var bound_1 = _convertDartToNative_IDBKey(bound); | 667 var bound_1 = _convertDartToNative_IDBKey(bound); |
| 607 return _upperBound__1(bound_1, open); | 668 return _upperBound__1(bound_1, open); |
| 608 } | 669 } |
| 609 var bound_2 = _convertDartToNative_IDBKey(bound); | 670 var bound_2 = _convertDartToNative_IDBKey(bound); |
| 610 return _upperBound__2(bound_2); | 671 return _upperBound__2(bound_2); |
| 611 } | 672 } |
| 612 @JSName('upperBound') | 673 @JSName('upperBound') |
| 613 @DocsEditable @DomName('IDBKeyRange.upperBound') | 674 @DocsEditable |
| 675 @DomName('IDBKeyRange.upperBound') |
| 614 static KeyRange _upperBound__1(bound, open) native; | 676 static KeyRange _upperBound__1(bound, open) native; |
| 615 @JSName('upperBound') | 677 @JSName('upperBound') |
| 616 @DocsEditable @DomName('IDBKeyRange.upperBound') | 678 @DocsEditable |
| 679 @DomName('IDBKeyRange.upperBound') |
| 617 static KeyRange _upperBound__2(bound) native; | 680 static KeyRange _upperBound__2(bound) native; |
| 618 | 681 |
| 619 } | 682 } |
| 620 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 683 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 621 // for details. All rights reserved. Use of this source code is governed by a | 684 // for details. All rights reserved. Use of this source code is governed by a |
| 622 // BSD-style license that can be found in the LICENSE file. | 685 // BSD-style license that can be found in the LICENSE file. |
| 623 | 686 |
| 624 | 687 |
| 625 | 688 |
| 626 @DocsEditable | 689 @DocsEditable |
| 627 @DomName('IDBObjectStore') | 690 @DomName('IDBObjectStore') |
| 628 class ObjectStore native "*IDBObjectStore" { | 691 class ObjectStore native "*IDBObjectStore" { |
| 629 | 692 |
| 630 @DocsEditable @DomName('IDBObjectStore.autoIncrement') | 693 @DocsEditable |
| 694 @DomName('IDBObjectStore.autoIncrement') |
| 631 final bool autoIncrement; | 695 final bool autoIncrement; |
| 632 | 696 |
| 633 @DocsEditable @DomName('IDBObjectStore.indexNames') | 697 @DocsEditable |
| 634 @Returns('DomStringList') @Creates('DomStringList') | 698 @DomName('IDBObjectStore.indexNames') |
| 699 @Returns('DomStringList') |
| 700 @Creates('DomStringList') |
| 635 final List<String> indexNames; | 701 final List<String> indexNames; |
| 636 | 702 |
| 637 @DocsEditable @DomName('IDBObjectStore.keyPath') | 703 @DocsEditable |
| 704 @DomName('IDBObjectStore.keyPath') |
| 638 final dynamic keyPath; | 705 final dynamic keyPath; |
| 639 | 706 |
| 640 @DocsEditable @DomName('IDBObjectStore.name') | 707 @DocsEditable |
| 708 @DomName('IDBObjectStore.name') |
| 641 final String name; | 709 final String name; |
| 642 | 710 |
| 643 @DocsEditable @DomName('IDBObjectStore.transaction') | 711 @DocsEditable |
| 712 @DomName('IDBObjectStore.transaction') |
| 644 final Transaction transaction; | 713 final Transaction transaction; |
| 645 | 714 |
| 646 Request add(/*any*/ value, [/*IDBKey*/ key]) { | 715 Request add(/*any*/ value, [/*IDBKey*/ key]) { |
| 647 if (?key) { | 716 if (?key) { |
| 648 var value_1 = convertDartToNative_SerializedScriptValue(value); | 717 var value_1 = convertDartToNative_SerializedScriptValue(value); |
| 649 var key_2 = _convertDartToNative_IDBKey(key); | 718 var key_2 = _convertDartToNative_IDBKey(key); |
| 650 return _add_1(value_1, key_2); | 719 return _add_1(value_1, key_2); |
| 651 } | 720 } |
| 652 var value_3 = convertDartToNative_SerializedScriptValue(value); | 721 var value_3 = convertDartToNative_SerializedScriptValue(value); |
| 653 return _add_2(value_3); | 722 return _add_2(value_3); |
| 654 } | 723 } |
| 655 @JSName('add') | 724 @JSName('add') |
| 656 @DocsEditable @DomName('IDBObjectStore.add') @Returns('Request') @Creates('Req
uest') @_annotation_Creates_IDBKey | 725 @DocsEditable |
| 726 @DomName('IDBObjectStore.add') |
| 657 Request _add_1(value, key) native; | 727 Request _add_1(value, key) native; |
| 658 @JSName('add') | 728 @JSName('add') |
| 659 @DocsEditable @DomName('IDBObjectStore.add') @Returns('Request') @Creates('Req
uest') @_annotation_Creates_IDBKey | 729 @DocsEditable |
| 730 @DomName('IDBObjectStore.add') |
| 660 Request _add_2(value) native; | 731 Request _add_2(value) native; |
| 661 | 732 |
| 662 @DocsEditable @DomName('IDBObjectStore.clear') | 733 @DocsEditable |
| 734 @DomName('IDBObjectStore.clear') |
| 663 Request clear() native; | 735 Request clear() native; |
| 664 | 736 |
| 665 Request count([key_OR_range]) { | 737 Request count([key_OR_range]) { |
| 666 if (!?key_OR_range) { | 738 if (!?key_OR_range) { |
| 667 return _count_1(); | 739 return _count_1(); |
| 668 } | 740 } |
| 669 if ((key_OR_range is KeyRange || key_OR_range == null)) { | 741 if ((key_OR_range is KeyRange || key_OR_range == null)) { |
| 670 return _count_2(key_OR_range); | 742 return _count_2(key_OR_range); |
| 671 } | 743 } |
| 672 if (?key_OR_range) { | 744 if (?key_OR_range) { |
| 673 var key_1 = _convertDartToNative_IDBKey(key_OR_range); | 745 var key_1 = _convertDartToNative_IDBKey(key_OR_range); |
| 674 return _count_3(key_1); | 746 return _count_3(key_1); |
| 675 } | 747 } |
| 676 throw new ArgumentError("Incorrect number or type of arguments"); | 748 throw new ArgumentError("Incorrect number or type of arguments"); |
| 677 } | 749 } |
| 678 @JSName('count') | 750 @JSName('count') |
| 679 @DocsEditable @DomName('IDBObjectStore.count') | 751 @DocsEditable |
| 752 @DomName('IDBObjectStore.count') |
| 680 Request _count_1() native; | 753 Request _count_1() native; |
| 681 @JSName('count') | 754 @JSName('count') |
| 682 @DocsEditable @DomName('IDBObjectStore.count') | 755 @DocsEditable |
| 756 @DomName('IDBObjectStore.count') |
| 683 Request _count_2(KeyRange range) native; | 757 Request _count_2(KeyRange range) native; |
| 684 @JSName('count') | 758 @JSName('count') |
| 685 @DocsEditable @DomName('IDBObjectStore.count') | 759 @DocsEditable |
| 760 @DomName('IDBObjectStore.count') |
| 686 Request _count_3(key) native; | 761 Request _count_3(key) native; |
| 687 | 762 |
| 688 Index createIndex(String name, keyPath, [Map options]) { | 763 Index createIndex(String name, keyPath, [Map options]) { |
| 689 if ((keyPath is List<String> || keyPath == null) && | 764 if ((keyPath is List<String> || keyPath == null) && |
| 690 !?options) { | 765 !?options) { |
| 691 return _createIndex_1(name, keyPath); | 766 return _createIndex_1(name, keyPath); |
| 692 } | 767 } |
| 693 if ((keyPath is List<String> || keyPath == null)) { | 768 if ((keyPath is List<String> || keyPath == null)) { |
| 694 var options_1 = convertDartToNative_Dictionary(options); | 769 var options_1 = convertDartToNative_Dictionary(options); |
| 695 return _createIndex_2(name, keyPath, options_1); | 770 return _createIndex_2(name, keyPath, options_1); |
| 696 } | 771 } |
| 697 if ((keyPath is String || keyPath == null) && | 772 if ((keyPath is String || keyPath == null) && |
| 698 !?options) { | 773 !?options) { |
| 699 return _createIndex_3(name, keyPath); | 774 return _createIndex_3(name, keyPath); |
| 700 } | 775 } |
| 701 if ((keyPath is String || keyPath == null)) { | 776 if ((keyPath is String || keyPath == null)) { |
| 702 var options_2 = convertDartToNative_Dictionary(options); | 777 var options_2 = convertDartToNative_Dictionary(options); |
| 703 return _createIndex_4(name, keyPath, options_2); | 778 return _createIndex_4(name, keyPath, options_2); |
| 704 } | 779 } |
| 705 throw new ArgumentError("Incorrect number or type of arguments"); | 780 throw new ArgumentError("Incorrect number or type of arguments"); |
| 706 } | 781 } |
| 707 @JSName('createIndex') | 782 @JSName('createIndex') |
| 708 @DocsEditable @DomName('IDBObjectStore.createIndex') | 783 @DocsEditable |
| 784 @DomName('IDBObjectStore.createIndex') |
| 709 Index _createIndex_1(name, List<String> keyPath) native; | 785 Index _createIndex_1(name, List<String> keyPath) native; |
| 710 @JSName('createIndex') | 786 @JSName('createIndex') |
| 711 @DocsEditable @DomName('IDBObjectStore.createIndex') | 787 @DocsEditable |
| 788 @DomName('IDBObjectStore.createIndex') |
| 712 Index _createIndex_2(name, List<String> keyPath, options) native; | 789 Index _createIndex_2(name, List<String> keyPath, options) native; |
| 713 @JSName('createIndex') | 790 @JSName('createIndex') |
| 714 @DocsEditable @DomName('IDBObjectStore.createIndex') | 791 @DocsEditable |
| 792 @DomName('IDBObjectStore.createIndex') |
| 715 Index _createIndex_3(name, String keyPath) native; | 793 Index _createIndex_3(name, String keyPath) native; |
| 716 @JSName('createIndex') | 794 @JSName('createIndex') |
| 717 @DocsEditable @DomName('IDBObjectStore.createIndex') | 795 @DocsEditable |
| 796 @DomName('IDBObjectStore.createIndex') |
| 718 Index _createIndex_4(name, String keyPath, options) native; | 797 Index _createIndex_4(name, String keyPath, options) native; |
| 719 | 798 |
| 720 Request delete(key_OR_keyRange) { | 799 Request delete(key_OR_keyRange) { |
| 721 if ((key_OR_keyRange is KeyRange || key_OR_keyRange == null)) { | 800 if ((key_OR_keyRange is KeyRange || key_OR_keyRange == null)) { |
| 722 return _delete_1(key_OR_keyRange); | 801 return _delete_1(key_OR_keyRange); |
| 723 } | 802 } |
| 724 if (?key_OR_keyRange) { | 803 if (?key_OR_keyRange) { |
| 725 var key_1 = _convertDartToNative_IDBKey(key_OR_keyRange); | 804 var key_1 = _convertDartToNative_IDBKey(key_OR_keyRange); |
| 726 return _delete_2(key_1); | 805 return _delete_2(key_1); |
| 727 } | 806 } |
| 728 throw new ArgumentError("Incorrect number or type of arguments"); | 807 throw new ArgumentError("Incorrect number or type of arguments"); |
| 729 } | 808 } |
| 730 @JSName('delete') | 809 @JSName('delete') |
| 731 @DocsEditable @DomName('IDBObjectStore.delete') | 810 @DocsEditable |
| 811 @DomName('IDBObjectStore.delete') |
| 732 Request _delete_1(KeyRange keyRange) native; | 812 Request _delete_1(KeyRange keyRange) native; |
| 733 @JSName('delete') | 813 @JSName('delete') |
| 734 @DocsEditable @DomName('IDBObjectStore.delete') | 814 @DocsEditable |
| 815 @DomName('IDBObjectStore.delete') |
| 735 Request _delete_2(key) native; | 816 Request _delete_2(key) native; |
| 736 | 817 |
| 737 @DocsEditable @DomName('IDBObjectStore.deleteIndex') | 818 @DocsEditable |
| 819 @DomName('IDBObjectStore.deleteIndex') |
| 738 void deleteIndex(String name) native; | 820 void deleteIndex(String name) native; |
| 739 | 821 |
| 740 Request getObject(key) { | 822 Request getObject(key) { |
| 741 if ((key is KeyRange || key == null)) { | 823 if ((key is KeyRange || key == null)) { |
| 742 return _getObject_1(key); | 824 return _getObject_1(key); |
| 743 } | 825 } |
| 744 if (?key) { | 826 if (?key) { |
| 745 var key_1 = _convertDartToNative_IDBKey(key); | 827 var key_1 = _convertDartToNative_IDBKey(key); |
| 746 return _getObject_2(key_1); | 828 return _getObject_2(key_1); |
| 747 } | 829 } |
| 748 throw new ArgumentError("Incorrect number or type of arguments"); | 830 throw new ArgumentError("Incorrect number or type of arguments"); |
| 749 } | 831 } |
| 750 @JSName('get') | 832 @JSName('get') |
| 751 @DocsEditable @DomName('IDBObjectStore.get') @Returns('Request') @Creates('Req
uest') @annotation_Creates_SerializedScriptValue | 833 @DocsEditable |
| 834 @DomName('IDBObjectStore.get') |
| 752 Request _getObject_1(KeyRange key) native; | 835 Request _getObject_1(KeyRange key) native; |
| 753 @JSName('get') | 836 @JSName('get') |
| 754 @DocsEditable @DomName('IDBObjectStore.get') @Returns('Request') @Creates('Req
uest') @annotation_Creates_SerializedScriptValue | 837 @DocsEditable |
| 838 @DomName('IDBObjectStore.get') |
| 755 Request _getObject_2(key) native; | 839 Request _getObject_2(key) native; |
| 756 | 840 |
| 757 @DocsEditable @DomName('IDBObjectStore.index') | 841 @DocsEditable |
| 842 @DomName('IDBObjectStore.index') |
| 758 Index index(String name) native; | 843 Index index(String name) native; |
| 759 | 844 |
| 760 Request openCursor([key_OR_range, String direction]) { | 845 Request openCursor([key_OR_range, String direction]) { |
| 761 if (!?key_OR_range && | 846 if (!?key_OR_range && |
| 762 !?direction) { | 847 !?direction) { |
| 763 return _openCursor_1(); | 848 return _openCursor_1(); |
| 764 } | 849 } |
| 765 if ((key_OR_range is KeyRange || key_OR_range == null) && | 850 if ((key_OR_range is KeyRange || key_OR_range == null) && |
| 766 !?direction) { | 851 !?direction) { |
| 767 return _openCursor_2(key_OR_range); | 852 return _openCursor_2(key_OR_range); |
| 768 } | 853 } |
| 769 if ((key_OR_range is KeyRange || key_OR_range == null)) { | 854 if ((key_OR_range is KeyRange || key_OR_range == null)) { |
| 770 return _openCursor_3(key_OR_range, direction); | 855 return _openCursor_3(key_OR_range, direction); |
| 771 } | 856 } |
| 772 if (?key_OR_range && | 857 if (?key_OR_range && |
| 773 !?direction) { | 858 !?direction) { |
| 774 var key_1 = _convertDartToNative_IDBKey(key_OR_range); | 859 var key_1 = _convertDartToNative_IDBKey(key_OR_range); |
| 775 return _openCursor_4(key_1); | 860 return _openCursor_4(key_1); |
| 776 } | 861 } |
| 777 if (?key_OR_range) { | 862 if (?key_OR_range) { |
| 778 var key_2 = _convertDartToNative_IDBKey(key_OR_range); | 863 var key_2 = _convertDartToNative_IDBKey(key_OR_range); |
| 779 return _openCursor_5(key_2, direction); | 864 return _openCursor_5(key_2, direction); |
| 780 } | 865 } |
| 781 throw new ArgumentError("Incorrect number or type of arguments"); | 866 throw new ArgumentError("Incorrect number or type of arguments"); |
| 782 } | 867 } |
| 783 @JSName('openCursor') | 868 @JSName('openCursor') |
| 784 @DocsEditable @DomName('IDBObjectStore.openCursor') @Returns('Request') @Creat
es('Request') @Creates('Cursor') | 869 @DocsEditable |
| 870 @DomName('IDBObjectStore.openCursor') |
| 785 Request _openCursor_1() native; | 871 Request _openCursor_1() native; |
| 786 @JSName('openCursor') | 872 @JSName('openCursor') |
| 787 @DocsEditable @DomName('IDBObjectStore.openCursor') @Returns('Request') @Creat
es('Request') @Creates('Cursor') | 873 @DocsEditable |
| 874 @DomName('IDBObjectStore.openCursor') |
| 788 Request _openCursor_2(KeyRange range) native; | 875 Request _openCursor_2(KeyRange range) native; |
| 789 @JSName('openCursor') | 876 @JSName('openCursor') |
| 790 @DocsEditable @DomName('IDBObjectStore.openCursor') @Returns('Request') @Creat
es('Request') @Creates('Cursor') | 877 @DocsEditable |
| 878 @DomName('IDBObjectStore.openCursor') |
| 791 Request _openCursor_3(KeyRange range, direction) native; | 879 Request _openCursor_3(KeyRange range, direction) native; |
| 792 @JSName('openCursor') | 880 @JSName('openCursor') |
| 793 @DocsEditable @DomName('IDBObjectStore.openCursor') @Returns('Request') @Creat
es('Request') @Creates('Cursor') | 881 @DocsEditable |
| 882 @DomName('IDBObjectStore.openCursor') |
| 794 Request _openCursor_4(key) native; | 883 Request _openCursor_4(key) native; |
| 795 @JSName('openCursor') | 884 @JSName('openCursor') |
| 796 @DocsEditable @DomName('IDBObjectStore.openCursor') @Returns('Request') @Creat
es('Request') @Creates('Cursor') | 885 @DocsEditable |
| 886 @DomName('IDBObjectStore.openCursor') |
| 797 Request _openCursor_5(key, direction) native; | 887 Request _openCursor_5(key, direction) native; |
| 798 | 888 |
| 799 Request put(/*any*/ value, [/*IDBKey*/ key]) { | 889 Request put(/*any*/ value, [/*IDBKey*/ key]) { |
| 800 if (?key) { | 890 if (?key) { |
| 801 var value_1 = convertDartToNative_SerializedScriptValue(value); | 891 var value_1 = convertDartToNative_SerializedScriptValue(value); |
| 802 var key_2 = _convertDartToNative_IDBKey(key); | 892 var key_2 = _convertDartToNative_IDBKey(key); |
| 803 return _put_1(value_1, key_2); | 893 return _put_1(value_1, key_2); |
| 804 } | 894 } |
| 805 var value_3 = convertDartToNative_SerializedScriptValue(value); | 895 var value_3 = convertDartToNative_SerializedScriptValue(value); |
| 806 return _put_2(value_3); | 896 return _put_2(value_3); |
| 807 } | 897 } |
| 808 @JSName('put') | 898 @JSName('put') |
| 809 @DocsEditable @DomName('IDBObjectStore.put') @Returns('Request') @Creates('Req
uest') @_annotation_Creates_IDBKey | 899 @DocsEditable |
| 900 @DomName('IDBObjectStore.put') |
| 810 Request _put_1(value, key) native; | 901 Request _put_1(value, key) native; |
| 811 @JSName('put') | 902 @JSName('put') |
| 812 @DocsEditable @DomName('IDBObjectStore.put') @Returns('Request') @Creates('Req
uest') @_annotation_Creates_IDBKey | 903 @DocsEditable |
| 904 @DomName('IDBObjectStore.put') |
| 813 Request _put_2(value) native; | 905 Request _put_2(value) native; |
| 814 } | 906 } |
| 815 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 907 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 816 // for details. All rights reserved. Use of this source code is governed by a | 908 // for details. All rights reserved. Use of this source code is governed by a |
| 817 // BSD-style license that can be found in the LICENSE file. | 909 // BSD-style license that can be found in the LICENSE file. |
| 818 | 910 |
| 819 | 911 |
| 820 | 912 |
| 821 @DocsEditable | 913 @DocsEditable |
| 822 @DomName('IDBOpenDBRequest') | 914 @DomName('IDBOpenDBRequest') |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 859 | 951 |
| 860 static const EventStreamProvider<Event> errorEvent = const EventStreamProvider
<Event>('error'); | 952 static const EventStreamProvider<Event> errorEvent = const EventStreamProvider
<Event>('error'); |
| 861 | 953 |
| 862 static const EventStreamProvider<Event> successEvent = const EventStreamProvid
er<Event>('success'); | 954 static const EventStreamProvider<Event> successEvent = const EventStreamProvid
er<Event>('success'); |
| 863 | 955 |
| 864 @DocsEditable | 956 @DocsEditable |
| 865 @DomName('EventTarget.addEventListener, EventTarget.removeEventListener, Event
Target.dispatchEvent') | 957 @DomName('EventTarget.addEventListener, EventTarget.removeEventListener, Event
Target.dispatchEvent') |
| 866 RequestEvents get on => | 958 RequestEvents get on => |
| 867 new RequestEvents(this); | 959 new RequestEvents(this); |
| 868 | 960 |
| 869 @DocsEditable @DomName('IDBRequest.error') | 961 @DocsEditable |
| 962 @DomName('IDBRequest.error') |
| 870 final DomError error; | 963 final DomError error; |
| 871 | 964 |
| 872 @DocsEditable @DomName('IDBRequest.readyState') | 965 @DocsEditable |
| 966 @DomName('IDBRequest.readyState') |
| 873 final String readyState; | 967 final String readyState; |
| 874 | 968 |
| 875 dynamic get result => _convertNativeToDart_IDBAny(this._result); | 969 dynamic get result => _convertNativeToDart_IDBAny(this._result); |
| 876 @JSName('result') | 970 @JSName('result') |
| 877 @DocsEditable @DomName('IDBRequest.result') @Creates('Null') | 971 @DocsEditable |
| 972 @DomName('IDBRequest.result') |
| 973 @Creates('Null') |
| 878 final dynamic _result; | 974 final dynamic _result; |
| 879 | 975 |
| 880 @DocsEditable @DomName('IDBRequest.source') @Creates('Null') | 976 @DocsEditable |
| 977 @DomName('IDBRequest.source') |
| 978 @Creates('Null') |
| 881 final dynamic source; | 979 final dynamic source; |
| 882 | 980 |
| 883 @DocsEditable @DomName('IDBRequest.transaction') | 981 @DocsEditable |
| 982 @DomName('IDBRequest.transaction') |
| 884 final Transaction transaction; | 983 final Transaction transaction; |
| 885 | 984 |
| 886 @DocsEditable @DomName('IDBRequest.webkitErrorMessage') | 985 @DocsEditable |
| 986 @DomName('IDBRequest.webkitErrorMessage') |
| 887 final String webkitErrorMessage; | 987 final String webkitErrorMessage; |
| 888 | 988 |
| 889 @JSName('addEventListener') | 989 @JSName('addEventListener') |
| 890 @DocsEditable @DomName('IDBRequest.addEventListener') | 990 @DocsEditable |
| 991 @DomName('IDBRequest.addEventListener') |
| 891 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native; | 992 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native; |
| 892 | 993 |
| 893 @JSName('dispatchEvent') | 994 @JSName('dispatchEvent') |
| 894 @DocsEditable @DomName('IDBRequest.dispatchEvent') | 995 @DocsEditable |
| 996 @DomName('IDBRequest.dispatchEvent') |
| 895 bool $dom_dispatchEvent(Event evt) native; | 997 bool $dom_dispatchEvent(Event evt) native; |
| 896 | 998 |
| 897 @JSName('removeEventListener') | 999 @JSName('removeEventListener') |
| 898 @DocsEditable @DomName('IDBRequest.removeEventListener') | 1000 @DocsEditable |
| 1001 @DomName('IDBRequest.removeEventListener') |
| 899 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native; | 1002 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native; |
| 900 | 1003 |
| 901 Stream<Event> get onError => errorEvent.forTarget(this); | 1004 Stream<Event> get onError => errorEvent.forTarget(this); |
| 902 | 1005 |
| 903 Stream<Event> get onSuccess => successEvent.forTarget(this); | 1006 Stream<Event> get onSuccess => successEvent.forTarget(this); |
| 904 } | 1007 } |
| 905 | 1008 |
| 906 @DocsEditable | 1009 @DocsEditable |
| 907 class RequestEvents extends Events { | 1010 class RequestEvents extends Events { |
| 908 @DocsEditable | 1011 @DocsEditable |
| (...skipping 19 matching lines...) Expand all Loading... |
| 928 | 1031 |
| 929 static const EventStreamProvider<Event> completeEvent = const EventStreamProvi
der<Event>('complete'); | 1032 static const EventStreamProvider<Event> completeEvent = const EventStreamProvi
der<Event>('complete'); |
| 930 | 1033 |
| 931 static const EventStreamProvider<Event> errorEvent = const EventStreamProvider
<Event>('error'); | 1034 static const EventStreamProvider<Event> errorEvent = const EventStreamProvider
<Event>('error'); |
| 932 | 1035 |
| 933 @DocsEditable | 1036 @DocsEditable |
| 934 @DomName('EventTarget.addEventListener, EventTarget.removeEventListener, Event
Target.dispatchEvent') | 1037 @DomName('EventTarget.addEventListener, EventTarget.removeEventListener, Event
Target.dispatchEvent') |
| 935 TransactionEvents get on => | 1038 TransactionEvents get on => |
| 936 new TransactionEvents(this); | 1039 new TransactionEvents(this); |
| 937 | 1040 |
| 938 @DocsEditable @DomName('IDBTransaction.db') | 1041 @DocsEditable |
| 1042 @DomName('IDBTransaction.db') |
| 939 final Database db; | 1043 final Database db; |
| 940 | 1044 |
| 941 @DocsEditable @DomName('IDBTransaction.error') | 1045 @DocsEditable |
| 1046 @DomName('IDBTransaction.error') |
| 942 final DomError error; | 1047 final DomError error; |
| 943 | 1048 |
| 944 @DocsEditable @DomName('IDBTransaction.mode') | 1049 @DocsEditable |
| 1050 @DomName('IDBTransaction.mode') |
| 945 final String mode; | 1051 final String mode; |
| 946 | 1052 |
| 947 @DocsEditable @DomName('IDBTransaction.webkitErrorMessage') | 1053 @DocsEditable |
| 1054 @DomName('IDBTransaction.webkitErrorMessage') |
| 948 final String webkitErrorMessage; | 1055 final String webkitErrorMessage; |
| 949 | 1056 |
| 950 @DocsEditable @DomName('IDBTransaction.abort') | 1057 @DocsEditable |
| 1058 @DomName('IDBTransaction.abort') |
| 951 void abort() native; | 1059 void abort() native; |
| 952 | 1060 |
| 953 @JSName('addEventListener') | 1061 @JSName('addEventListener') |
| 954 @DocsEditable @DomName('IDBTransaction.addEventListener') | 1062 @DocsEditable |
| 1063 @DomName('IDBTransaction.addEventListener') |
| 955 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native; | 1064 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native; |
| 956 | 1065 |
| 957 @JSName('dispatchEvent') | 1066 @JSName('dispatchEvent') |
| 958 @DocsEditable @DomName('IDBTransaction.dispatchEvent') | 1067 @DocsEditable |
| 1068 @DomName('IDBTransaction.dispatchEvent') |
| 959 bool $dom_dispatchEvent(Event evt) native; | 1069 bool $dom_dispatchEvent(Event evt) native; |
| 960 | 1070 |
| 961 @DocsEditable @DomName('IDBTransaction.objectStore') | 1071 @DocsEditable |
| 1072 @DomName('IDBTransaction.objectStore') |
| 962 ObjectStore objectStore(String name) native; | 1073 ObjectStore objectStore(String name) native; |
| 963 | 1074 |
| 964 @JSName('removeEventListener') | 1075 @JSName('removeEventListener') |
| 965 @DocsEditable @DomName('IDBTransaction.removeEventListener') | 1076 @DocsEditable |
| 1077 @DomName('IDBTransaction.removeEventListener') |
| 966 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native; | 1078 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native; |
| 967 | 1079 |
| 968 Stream<Event> get onAbort => abortEvent.forTarget(this); | 1080 Stream<Event> get onAbort => abortEvent.forTarget(this); |
| 969 | 1081 |
| 970 Stream<Event> get onComplete => completeEvent.forTarget(this); | 1082 Stream<Event> get onComplete => completeEvent.forTarget(this); |
| 971 | 1083 |
| 972 Stream<Event> get onError => errorEvent.forTarget(this); | 1084 Stream<Event> get onError => errorEvent.forTarget(this); |
| 973 } | 1085 } |
| 974 | 1086 |
| 975 @DocsEditable | 1087 @DocsEditable |
| (...skipping 13 matching lines...) Expand all Loading... |
| 989 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1101 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 990 // for details. All rights reserved. Use of this source code is governed by a | 1102 // for details. All rights reserved. Use of this source code is governed by a |
| 991 // BSD-style license that can be found in the LICENSE file. | 1103 // BSD-style license that can be found in the LICENSE file. |
| 992 | 1104 |
| 993 | 1105 |
| 994 | 1106 |
| 995 @DocsEditable | 1107 @DocsEditable |
| 996 @DomName('IDBVersionChangeEvent') | 1108 @DomName('IDBVersionChangeEvent') |
| 997 class UpgradeNeededEvent extends Event native "*IDBVersionChangeEvent" { | 1109 class UpgradeNeededEvent extends Event native "*IDBVersionChangeEvent" { |
| 998 | 1110 |
| 999 @DocsEditable @DomName('IDBUpgradeNeededEvent.newVersion') | 1111 @DocsEditable |
| 1112 @DomName('IDBUpgradeNeededEvent.newVersion') |
| 1000 final int newVersion; | 1113 final int newVersion; |
| 1001 | 1114 |
| 1002 @DocsEditable @DomName('IDBUpgradeNeededEvent.oldVersion') | 1115 @DocsEditable |
| 1116 @DomName('IDBUpgradeNeededEvent.oldVersion') |
| 1003 final int oldVersion; | 1117 final int oldVersion; |
| 1004 } | 1118 } |
| 1005 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1119 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 1006 // for details. All rights reserved. Use of this source code is governed by a | 1120 // for details. All rights reserved. Use of this source code is governed by a |
| 1007 // BSD-style license that can be found in the LICENSE file. | 1121 // BSD-style license that can be found in the LICENSE file. |
| 1008 | 1122 |
| 1009 | 1123 |
| 1010 | 1124 |
| 1011 @DocsEditable | 1125 @DocsEditable |
| 1012 @DomName('IDBVersionChangeEvent') | 1126 @DomName('IDBVersionChangeEvent') |
| 1013 class VersionChangeEvent extends Event native "*IDBVersionChangeEvent" { | 1127 class VersionChangeEvent extends Event native "*IDBVersionChangeEvent" { |
| 1014 | 1128 |
| 1015 @DocsEditable @DomName('IDBVersionChangeEvent.version') | 1129 @DocsEditable |
| 1130 @DomName('IDBVersionChangeEvent.version') |
| 1016 final String version; | 1131 final String version; |
| 1017 } | 1132 } |
| 1018 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1133 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 1019 // for details. All rights reserved. Use of this source code is governed by a | 1134 // for details. All rights reserved. Use of this source code is governed by a |
| 1020 // BSD-style license that can be found in the LICENSE file. | 1135 // BSD-style license that can be found in the LICENSE file. |
| 1021 | 1136 |
| 1022 | 1137 |
| 1023 | 1138 |
| 1024 @DocsEditable | 1139 @DocsEditable |
| 1025 @DomName('IDBVersionChangeRequest') | 1140 @DomName('IDBVersionChangeRequest') |
| (...skipping 20 matching lines...) Expand all Loading... |
| 1046 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1161 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 1047 // for details. All rights reserved. Use of this source code is governed by a | 1162 // for details. All rights reserved. Use of this source code is governed by a |
| 1048 // BSD-style license that can be found in the LICENSE file. | 1163 // BSD-style license that can be found in the LICENSE file. |
| 1049 | 1164 |
| 1050 | 1165 |
| 1051 | 1166 |
| 1052 @DocsEditable | 1167 @DocsEditable |
| 1053 @DomName('IDBAny') | 1168 @DomName('IDBAny') |
| 1054 class _Any native "*IDBAny" { | 1169 class _Any native "*IDBAny" { |
| 1055 } | 1170 } |
| OLD | NEW |