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

Side by Side Diff: tools/dom/templates/html/impl/impl_IDBIndex.darttemplate

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
« tests/html/html.status ('K') | « tools/dom/idl/dart/dart.idl ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of $LIBRARYNAME; 5 part of $LIBRARYNAME;
6 6
7 $(ANNOTATIONS)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { 7 $(ANNOTATIONS)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
8 @DomName('IDBIndex.count') 8 @DomName('IDBIndex.count')
9 Future<int> count([key_OR_range]) { 9 Future<int> count([key_OR_range]) {
10 try { 10 try {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 bool autoAdvance}) { 48 bool autoAdvance}) {
49 var key_OR_range = null; 49 var key_OR_range = null;
50 if (key != null) { 50 if (key != null) {
51 if (range != null) { 51 if (range != null) {
52 throw new ArgumentError('Cannot specify both key and range.'); 52 throw new ArgumentError('Cannot specify both key and range.');
53 } 53 }
54 key_OR_range = key; 54 key_OR_range = key;
55 } else { 55 } else {
56 key_OR_range = range; 56 key_OR_range = range;
57 } 57 }
58 var request = _openCursor(key_OR_range, direction); 58 var request;
59 if (direction == null) {
60 request = _openCursor(key_OR_range);
61 } else {
62 request = _openCursor(key_OR_range, direction);
63 }
59 return ObjectStore._cursorStreamFromResult(request, autoAdvance); 64 return ObjectStore._cursorStreamFromResult(request, autoAdvance);
60 } 65 }
61 66
62 /** 67 /**
63 * Creates a stream of cursors over the records in this object store. 68 * Creates a stream of cursors over the records in this object store.
64 * 69 *
65 * See also: 70 * See also:
66 * 71 *
67 * * [ObjectStore.openCursor] 72 * * [ObjectStore.openCursor]
68 */ 73 */
69 Stream<Cursor> openKeyCursor({key, KeyRange range, String direction, 74 Stream<Cursor> openKeyCursor({key, KeyRange range, String direction,
70 bool autoAdvance}) { 75 bool autoAdvance}) {
71 var key_OR_range = null; 76 var key_OR_range = null;
72 if (key != null) { 77 if (key != null) {
73 if (range != null) { 78 if (range != null) {
74 throw new ArgumentError('Cannot specify both key and range.'); 79 throw new ArgumentError('Cannot specify both key and range.');
75 } 80 }
76 key_OR_range = key; 81 key_OR_range = key;
77 } else { 82 } else {
78 key_OR_range = range; 83 key_OR_range = range;
79 } 84 }
80 var request = _openKeyCursor(key_OR_range, direction); 85 var request;
86 if (direction == null) {
87 request = _openKeyCursor(key_OR_range);
88 } else {
89 request = _openKeyCursor(key_OR_range, direction);
90 }
81 return ObjectStore._cursorStreamFromResult(request, autoAdvance); 91 return ObjectStore._cursorStreamFromResult(request, autoAdvance);
82 } 92 }
83 93
84 $!MEMBERS 94 $!MEMBERS
85 } 95 }
OLDNEW
« tests/html/html.status ('K') | « tools/dom/idl/dart/dart.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698