| Index: sdk/lib/web_sql/dartium/web_sql_dartium.dart
|
| diff --git a/sdk/lib/web_sql/dartium/web_sql_dartium.dart b/sdk/lib/web_sql/dartium/web_sql_dartium.dart
|
| index c7c3bc00c1e0ac7e17f1021006f16bf77bfb7e4e..c72e56f75320c34aa74e54c8ca68ec6d6b8df581 100644
|
| --- a/sdk/lib/web_sql/dartium/web_sql_dartium.dart
|
| +++ b/sdk/lib/web_sql/dartium/web_sql_dartium.dart
|
| @@ -217,7 +217,12 @@ class SqlResultSetRowList extends NativeFieldWrapperClass1 with ListMixin<Map>,
|
| @DocsEditable
|
| int get length native "SQLResultSetRowList_length_Getter";
|
|
|
| - Map operator[](int index) native "SQLResultSetRowList_item_Callback";
|
| + Map operator[](int index) {
|
| + if (index < 0 || index >= length)
|
| + throw new RangeError.range(index, 0, length);
|
| + return _nativeIndexedGetter(index);
|
| + }
|
| + Map _nativeIndexedGetter(int index) native "SQLResultSetRowList_item_Callback";
|
|
|
| void operator[]=(int index, Map value) {
|
| throw new UnsupportedError("Cannot assign element of immutable List.");
|
| @@ -230,6 +235,31 @@ class SqlResultSetRowList extends NativeFieldWrapperClass1 with ListMixin<Map>,
|
| throw new UnsupportedError("Cannot resize immutable List.");
|
| }
|
|
|
| + Map get first {
|
| + if (this.length > 0) {
|
| + return this[0];
|
| + }
|
| + throw new StateError("No elements");
|
| + }
|
| +
|
| + Map get last {
|
| + int len = this.length;
|
| + if (len > 0) {
|
| + return this[len - 1];
|
| + }
|
| + throw new StateError("No elements");
|
| + }
|
| +
|
| + Map get single {
|
| + int len = this.length;
|
| + if (len == 1) {
|
| + return this[0];
|
| + }
|
| + if (len == 0) throw new StateError("No elements");
|
| + throw new StateError("More than one element");
|
| + }
|
| +
|
| + Map elementAt(int index) => this[index];
|
| // -- end List<Map> mixins.
|
|
|
| @DomName('SQLResultSetRowList.item')
|
|
|