| OLD | NEW |
| 1 /** | 1 /** |
| 2 * A client-side key-value store with support for indexes. | 2 * A client-side key-value store with support for indexes. |
| 3 * | 3 * |
| 4 * Many browsers support IndexedDB—a web standard for | 4 * Many browsers support IndexedDB—a web standard for |
| 5 * an indexed database. | 5 * an indexed database. |
| 6 * By storing data on the client in an IndexedDB, | 6 * By storing data on the client in an IndexedDB, |
| 7 * a web app gets some advantages, such as faster performance and persistence. | 7 * a web app gets some advantages, such as faster performance and persistence. |
| 8 * To find out which browsers support IndexedDB, | 8 * To find out which browsers support IndexedDB, |
| 9 * refer to [Can I Use?](http://caniuse.com/#feat=indexeddb) | 9 * refer to [Can I Use?](http://caniuse.com/#feat=indexeddb) |
| 10 * | 10 * |
| (...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1064 Request _clear() native; | 1064 Request _clear() native; |
| 1065 | 1065 |
| 1066 @JSName('count') | 1066 @JSName('count') |
| 1067 @DomName('IDBObjectStore.count') | 1067 @DomName('IDBObjectStore.count') |
| 1068 @DocsEditable() | 1068 @DocsEditable() |
| 1069 Request _count(Object key) native; | 1069 Request _count(Object key) native; |
| 1070 | 1070 |
| 1071 @DomName('IDBObjectStore.createIndex') | 1071 @DomName('IDBObjectStore.createIndex') |
| 1072 @DocsEditable() | 1072 @DocsEditable() |
| 1073 Index _createIndex(String name, keyPath, [Map options]) { | 1073 Index _createIndex(String name, keyPath, [Map options]) { |
| 1074 if ((keyPath is String || keyPath == null) && options == null) { |
| 1075 return _createIndex_1(name, keyPath); |
| 1076 } |
| 1077 if (options != null && (keyPath is String || keyPath == null)) { |
| 1078 var options_1 = convertDartToNative_Dictionary(options); |
| 1079 return _createIndex_2(name, keyPath, options_1); |
| 1080 } |
| 1074 if ((keyPath is List<String> || keyPath == null) && options == null) { | 1081 if ((keyPath is List<String> || keyPath == null) && options == null) { |
| 1075 List keyPath_1 = convertDartToNative_StringArray(keyPath); | 1082 List keyPath_2 = convertDartToNative_StringArray(keyPath); |
| 1076 return _createIndex_1(name, keyPath_1); | 1083 return _createIndex_3(name, keyPath_2); |
| 1077 } | 1084 } |
| 1078 if (options != null && (keyPath is List<String> || keyPath == null)) { | 1085 if (options != null && (keyPath is List<String> || keyPath == null)) { |
| 1079 List keyPath_2 = convertDartToNative_StringArray(keyPath); | 1086 List keyPath_3 = convertDartToNative_StringArray(keyPath); |
| 1080 var options_3 = convertDartToNative_Dictionary(options); | |
| 1081 return _createIndex_2(name, keyPath_2, options_3); | |
| 1082 } | |
| 1083 if ((keyPath is String || keyPath == null) && options == null) { | |
| 1084 return _createIndex_3(name, keyPath); | |
| 1085 } | |
| 1086 if (options != null && (keyPath is String || keyPath == null)) { | |
| 1087 var options_4 = convertDartToNative_Dictionary(options); | 1087 var options_4 = convertDartToNative_Dictionary(options); |
| 1088 return _createIndex_4(name, keyPath, options_4); | 1088 return _createIndex_4(name, keyPath_3, options_4); |
| 1089 } | 1089 } |
| 1090 throw new ArgumentError("Incorrect number or type of arguments"); | 1090 throw new ArgumentError("Incorrect number or type of arguments"); |
| 1091 } | 1091 } |
| 1092 @JSName('createIndex') | 1092 @JSName('createIndex') |
| 1093 @DomName('IDBObjectStore.createIndex') | 1093 @DomName('IDBObjectStore.createIndex') |
| 1094 @DocsEditable() | 1094 @DocsEditable() |
| 1095 Index _createIndex_1(name, List keyPath) native; | 1095 Index _createIndex_1(name, String keyPath) native; |
| 1096 @JSName('createIndex') | 1096 @JSName('createIndex') |
| 1097 @DomName('IDBObjectStore.createIndex') | 1097 @DomName('IDBObjectStore.createIndex') |
| 1098 @DocsEditable() | 1098 @DocsEditable() |
| 1099 Index _createIndex_2(name, List keyPath, options) native; | 1099 Index _createIndex_2(name, String keyPath, options) native; |
| 1100 @JSName('createIndex') | 1100 @JSName('createIndex') |
| 1101 @DomName('IDBObjectStore.createIndex') | 1101 @DomName('IDBObjectStore.createIndex') |
| 1102 @DocsEditable() | 1102 @DocsEditable() |
| 1103 Index _createIndex_3(name, String keyPath) native; | 1103 Index _createIndex_3(name, List keyPath) native; |
| 1104 @JSName('createIndex') | 1104 @JSName('createIndex') |
| 1105 @DomName('IDBObjectStore.createIndex') | 1105 @DomName('IDBObjectStore.createIndex') |
| 1106 @DocsEditable() | 1106 @DocsEditable() |
| 1107 Index _createIndex_4(name, String keyPath, options) native; | 1107 Index _createIndex_4(name, List keyPath, options) native; |
| 1108 | 1108 |
| 1109 @JSName('delete') | 1109 @JSName('delete') |
| 1110 @DomName('IDBObjectStore.delete') | 1110 @DomName('IDBObjectStore.delete') |
| 1111 @DocsEditable() | 1111 @DocsEditable() |
| 1112 Request _delete(Object key) native; | 1112 Request _delete(Object key) native; |
| 1113 | 1113 |
| 1114 @DomName('IDBObjectStore.deleteIndex') | 1114 @DomName('IDBObjectStore.deleteIndex') |
| 1115 @DocsEditable() | 1115 @DocsEditable() |
| 1116 void deleteIndex(String name) native; | 1116 void deleteIndex(String name) native; |
| 1117 | 1117 |
| 1118 @JSName('get') | 1118 @JSName('get') |
| 1119 @DomName('IDBObjectStore.get') | 1119 @DomName('IDBObjectStore.get') |
| 1120 @DocsEditable() | 1120 @DocsEditable() |
| 1121 @Returns('Request') | 1121 @Returns('Request') |
| 1122 @Creates('Request') | 1122 @Creates('Request') |
| 1123 @annotation_Creates_SerializedScriptValue | 1123 @annotation_Creates_SerializedScriptValue |
| 1124 Request _get(Object key) native; | 1124 Request _get(Object key) native; |
| 1125 | 1125 |
| 1126 @DomName('IDBObjectStore.index') | 1126 @DomName('IDBObjectStore.index') |
| 1127 @DocsEditable() | 1127 @DocsEditable() |
| 1128 Index index(String name) native; | 1128 Index index(String name) native; |
| 1129 | 1129 |
| 1130 @JSName('openCursor') | 1130 @JSName('openCursor') |
| 1131 @DomName('IDBObjectStore.openCursor') | 1131 @DomName('IDBObjectStore.openCursor') |
| 1132 @DocsEditable() | 1132 @DocsEditable() |
| 1133 @Returns('Request') | 1133 @Returns('Request') |
| 1134 @Creates('Request') | 1134 @Creates('Request') |
| 1135 @Creates('Cursor') | 1135 @Creates('Cursor') |
| 1136 Request _openCursor(Object key, [String direction]) native; | 1136 Request _openCursor(Object range, [String direction]) native; |
| 1137 | 1137 |
| 1138 @DomName('IDBObjectStore.openKeyCursor') | 1138 @DomName('IDBObjectStore.openKeyCursor') |
| 1139 @DocsEditable() | 1139 @DocsEditable() |
| 1140 @Experimental() // untriaged | 1140 @Experimental() // untriaged |
| 1141 Request openKeyCursor(Object range, String direction) native; | 1141 Request openKeyCursor(Object range, String direction) native; |
| 1142 | 1142 |
| 1143 @DomName('IDBObjectStore.put') | 1143 @DomName('IDBObjectStore.put') |
| 1144 @DocsEditable() | 1144 @DocsEditable() |
| 1145 @Returns('Request') | 1145 @Returns('Request') |
| 1146 @Creates('Request') | 1146 @Creates('Request') |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1436 | 1436 |
| 1437 @DomName('IDBVersionChangeEvent.dataLossMessage') | 1437 @DomName('IDBVersionChangeEvent.dataLossMessage') |
| 1438 @DocsEditable() | 1438 @DocsEditable() |
| 1439 @Experimental() // untriaged | 1439 @Experimental() // untriaged |
| 1440 final String dataLossMessage; | 1440 final String dataLossMessage; |
| 1441 | 1441 |
| 1442 @DomName('IDBVersionChangeEvent.newVersion') | 1442 @DomName('IDBVersionChangeEvent.newVersion') |
| 1443 @DocsEditable() | 1443 @DocsEditable() |
| 1444 @Creates('int|String|Null') | 1444 @Creates('int|String|Null') |
| 1445 @Returns('int|String|Null') | 1445 @Returns('int|String|Null') |
| 1446 final Object newVersion; | 1446 final int newVersion; |
| 1447 | 1447 |
| 1448 @DomName('IDBVersionChangeEvent.oldVersion') | 1448 @DomName('IDBVersionChangeEvent.oldVersion') |
| 1449 @DocsEditable() | 1449 @DocsEditable() |
| 1450 @Creates('int|String|Null') | 1450 @Creates('int|String|Null') |
| 1451 @Returns('int|String|Null') | 1451 @Returns('int|String|Null') |
| 1452 final Object oldVersion; | 1452 final int oldVersion; |
| 1453 } | 1453 } |
| OLD | NEW |