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

Side by Side Diff: sdk/lib/web_sql/dart2js/web_sql_dart2js.dart

Issue 13548002: Add Iterable.fold (and Stream.fold) which replace `reduce`. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 years, 8 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
« no previous file with comments | « sdk/lib/svg/dartium/svg_dartium.dart ('k') | sdk/lib/web_sql/dartium/web_sql_dartium.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 // Note: NodeLists are not fixed size. And most probably length shouldn't 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 261 // be cached in both iterator _and_ forEach method. For now caching it
262 // for consistency. 262 // for consistency.
263 return new FixedSizeListIterator<Map>(this); 263 return new FixedSizeListIterator<Map>(this);
264 } 264 }
265 265
266 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Map)) { 266 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Map)) {
267 return IterableMixinWorkaround.reduce(this, initialValue, combine); 267 return IterableMixinWorkaround.reduce(this, initialValue, combine);
268 } 268 }
269 269
270 dynamic fold(dynamic initialValue, dynamic combine(dynamic, Map)) {
271 return IterableMixinWorkaround.fold(this, initialValue, combine);
272 }
273
270 bool contains(Map element) => IterableMixinWorkaround.contains(this, element); 274 bool contains(Map element) => IterableMixinWorkaround.contains(this, element);
271 275
272 void forEach(void f(Map element)) => IterableMixinWorkaround.forEach(this, f); 276 void forEach(void f(Map element)) => IterableMixinWorkaround.forEach(this, f);
273 277
274 String join([String separator]) => 278 String join([String separator]) =>
275 IterableMixinWorkaround.joinList(this, separator); 279 IterableMixinWorkaround.joinList(this, separator);
276 280
277 Iterable map(f(Map element)) => 281 Iterable map(f(Map element)) =>
278 IterableMixinWorkaround.mapList(this, f); 282 IterableMixinWorkaround.mapList(this, f);
279 283
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 @DomName('SQLTransactionSync') 477 @DomName('SQLTransactionSync')
474 @SupportedBrowser(SupportedBrowser.CHROME) 478 @SupportedBrowser(SupportedBrowser.CHROME)
475 @SupportedBrowser(SupportedBrowser.SAFARI) 479 @SupportedBrowser(SupportedBrowser.SAFARI)
476 @Experimental 480 @Experimental
477 class SqlTransactionSync native "*SQLTransactionSync" { 481 class SqlTransactionSync native "*SQLTransactionSync" {
478 482
479 @DomName('SQLTransactionSync.executeSql') 483 @DomName('SQLTransactionSync.executeSql')
480 @DocsEditable 484 @DocsEditable
481 SqlResultSet executeSql(String sqlStatement, List arguments) native; 485 SqlResultSet executeSql(String sqlStatement, List arguments) native;
482 } 486 }
OLDNEW
« no previous file with comments | « sdk/lib/svg/dartium/svg_dartium.dart ('k') | sdk/lib/web_sql/dartium/web_sql_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698