Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Side by Side Diff: sdk/lib/indexed_db/dartium/indexed_db_dartium.dart

Issue 23461018: Fixing Indexed DB from latest Blink roll (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 library dart.dom.indexed_db; 1 library dart.dom.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 import 'dart:nativewrappers'; 6 import 'dart:nativewrappers';
7 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 7 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
8 // for details. All rights reserved. Use of this source code is governed by a 8 // for details. All rights reserved. Use of this source code is governed by a
9 // BSD-style license that can be found in the LICENSE file. 9 // BSD-style license that can be found in the LICENSE file.
10 10
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 bool autoAdvance}) { 434 bool autoAdvance}) {
435 var key_OR_range = null; 435 var key_OR_range = null;
436 if (key != null) { 436 if (key != null) {
437 if (range != null) { 437 if (range != null) {
438 throw new ArgumentError('Cannot specify both key and range.'); 438 throw new ArgumentError('Cannot specify both key and range.');
439 } 439 }
440 key_OR_range = key; 440 key_OR_range = key;
441 } else { 441 } else {
442 key_OR_range = range; 442 key_OR_range = range;
443 } 443 }
444 var request = _openCursor(key_OR_range, direction); 444 var request;
445 if (direction == null) {
446 request = _openCursor(key_OR_range);
447 } else {
448 request = _openCursor(key_OR_range, direction);
449 }
445 return ObjectStore._cursorStreamFromResult(request, autoAdvance); 450 return ObjectStore._cursorStreamFromResult(request, autoAdvance);
446 } 451 }
447 452
448 /** 453 /**
449 * Creates a stream of cursors over the records in this object store. 454 * Creates a stream of cursors over the records in this object store.
450 * 455 *
451 * See also: 456 * See also:
452 * 457 *
453 * * [ObjectStore.openCursor] 458 * * [ObjectStore.openCursor]
454 */ 459 */
455 Stream<Cursor> openKeyCursor({key, KeyRange range, String direction, 460 Stream<Cursor> openKeyCursor({key, KeyRange range, String direction,
456 bool autoAdvance}) { 461 bool autoAdvance}) {
457 var key_OR_range = null; 462 var key_OR_range = null;
458 if (key != null) { 463 if (key != null) {
459 if (range != null) { 464 if (range != null) {
460 throw new ArgumentError('Cannot specify both key and range.'); 465 throw new ArgumentError('Cannot specify both key and range.');
461 } 466 }
462 key_OR_range = key; 467 key_OR_range = key;
463 } else { 468 } else {
464 key_OR_range = range; 469 key_OR_range = range;
465 } 470 }
466 var request = _openKeyCursor(key_OR_range, direction); 471 var request;
472 if (direction == null) {
473 request = _openKeyCursor(key_OR_range);
474 } else {
475 request = _openKeyCursor(key_OR_range, direction);
476 }
467 return ObjectStore._cursorStreamFromResult(request, autoAdvance); 477 return ObjectStore._cursorStreamFromResult(request, autoAdvance);
468 } 478 }
469 479
470 480
471 @DomName('IDBIndex.keyPath') 481 @DomName('IDBIndex.keyPath')
472 @DocsEditable() 482 @DocsEditable()
473 dynamic get keyPath native "IDBIndex_keyPath_Getter"; 483 dynamic get keyPath native "IDBIndex_keyPath_Getter";
474 484
475 @DomName('IDBIndex.multiEntry') 485 @DomName('IDBIndex.multiEntry')
476 @DocsEditable() 486 @DocsEditable()
(...skipping 18 matching lines...) Expand all
495 @DomName('IDBIndex.get') 505 @DomName('IDBIndex.get')
496 @DocsEditable() 506 @DocsEditable()
497 Request _get(Object key) native "IDBIndex_get_Callback"; 507 Request _get(Object key) native "IDBIndex_get_Callback";
498 508
499 @DomName('IDBIndex.getKey') 509 @DomName('IDBIndex.getKey')
500 @DocsEditable() 510 @DocsEditable()
501 Request _getKey(Object key) native "IDBIndex_getKey_Callback"; 511 Request _getKey(Object key) native "IDBIndex_getKey_Callback";
502 512
503 @DomName('IDBIndex.openCursor') 513 @DomName('IDBIndex.openCursor')
504 @DocsEditable() 514 @DocsEditable()
505 Request _openCursor(Object key, String direction) native "IDBIndex_openCursor_ Callback"; 515 Request _openCursor(Object key, [String direction]) native "IDBIndex_openCurso r_Callback";
506 516
507 @DomName('IDBIndex.openKeyCursor') 517 @DomName('IDBIndex.openKeyCursor')
508 @DocsEditable() 518 @DocsEditable()
509 Request _openKeyCursor(Object key, String direction) native "IDBIndex_openKeyC ursor_Callback"; 519 Request _openKeyCursor(Object key, [String direction]) native "IDBIndex_openKe yCursor_Callback";
510 520
511 } 521 }
512 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 522 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
513 // for details. All rights reserved. Use of this source code is governed by a 523 // for details. All rights reserved. Use of this source code is governed by a
514 // BSD-style license that can be found in the LICENSE file. 524 // BSD-style license that can be found in the LICENSE file.
515 525
516 526
517 @DomName('IDBKeyRange') 527 @DomName('IDBKeyRange')
518 @Unstable() 528 @Unstable()
519 class KeyRange extends NativeFieldWrapperClass1 { 529 class KeyRange extends NativeFieldWrapperClass1 {
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
1031 1041
1032 // WARNING: Do not edit - generated code. 1042 // WARNING: Do not edit - generated code.
1033 1043
1034 1044
1035 @DocsEditable() 1045 @DocsEditable()
1036 @DomName('IDBAny') 1046 @DomName('IDBAny')
1037 @deprecated // nonstandard 1047 @deprecated // nonstandard
1038 abstract class _IDBAny extends NativeFieldWrapperClass1 { 1048 abstract class _IDBAny extends NativeFieldWrapperClass1 {
1039 1049
1040 } 1050 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698