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

Side by Side Diff: sdk/lib/web_sql/dartium/web_sql_dartium.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/web_sql/dart2js/web_sql_dart2js.dart ('k') | tests/corelib/collection_test.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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 // Note: NodeLists are not fixed size. And most probably length shouldn't 282 // Note: NodeLists are not fixed size. And most probably length shouldn't
283 // be cached in both iterator _and_ forEach method. For now caching it 283 // be cached in both iterator _and_ forEach method. For now caching it
284 // for consistency. 284 // for consistency.
285 return new FixedSizeListIterator<Map>(this); 285 return new FixedSizeListIterator<Map>(this);
286 } 286 }
287 287
288 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Map)) { 288 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Map)) {
289 return IterableMixinWorkaround.reduce(this, initialValue, combine); 289 return IterableMixinWorkaround.reduce(this, initialValue, combine);
290 } 290 }
291 291
292 dynamic fold(dynamic initialValue, dynamic combine(dynamic, Map)) {
293 return IterableMixinWorkaround.fold(this, initialValue, combine);
294 }
295
292 bool contains(Map element) => IterableMixinWorkaround.contains(this, element); 296 bool contains(Map element) => IterableMixinWorkaround.contains(this, element);
293 297
294 void forEach(void f(Map element)) => IterableMixinWorkaround.forEach(this, f); 298 void forEach(void f(Map element)) => IterableMixinWorkaround.forEach(this, f);
295 299
296 String join([String separator]) => 300 String join([String separator]) =>
297 IterableMixinWorkaround.joinList(this, separator); 301 IterableMixinWorkaround.joinList(this, separator);
298 302
299 Iterable map(f(Map element)) => 303 Iterable map(f(Map element)) =>
300 IterableMixinWorkaround.mapList(this, f); 304 IterableMixinWorkaround.mapList(this, f);
301 305
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 @SupportedBrowser(SupportedBrowser.SAFARI) 500 @SupportedBrowser(SupportedBrowser.SAFARI)
497 @Experimental 501 @Experimental
498 class SqlTransactionSync extends NativeFieldWrapperClass1 { 502 class SqlTransactionSync extends NativeFieldWrapperClass1 {
499 SqlTransactionSync.internal(); 503 SqlTransactionSync.internal();
500 504
501 @DomName('SQLTransactionSync.executeSql') 505 @DomName('SQLTransactionSync.executeSql')
502 @DocsEditable 506 @DocsEditable
503 SqlResultSet executeSql(String sqlStatement, List arguments) native "SQLTransa ctionSync_executeSql_Callback"; 507 SqlResultSet executeSql(String sqlStatement, List arguments) native "SQLTransa ctionSync_executeSql_Callback";
504 508
505 } 509 }
OLDNEW
« no previous file with comments | « sdk/lib/web_sql/dart2js/web_sql_dart2js.dart ('k') | tests/corelib/collection_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698