OLD | NEW |
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 */ |
11 library dart.dom.web_sql; | 11 library dart.dom.web_sql; |
12 | 12 |
13 import 'dart:async'; | 13 import 'dart:async'; |
14 import 'dart:collection'; | 14 import 'dart:collection'; |
15 import 'dart:_internal'; | 15 import 'dart:_internal'; |
16 import 'dart:html'; | 16 import 'dart:html'; |
17 import 'dart:html_common'; | 17 import 'dart:html_common'; |
18 import 'dart:nativewrappers'; | 18 import 'dart:nativewrappers'; |
19 import 'dart:_blink' as _blink; | 19 import 'dart:_blink' as _blink; |
20 import 'dart:js' as js; | 20 import 'dart:js' as js; |
21 | 21 |
22 // DO NOT EDIT - unless you are editing documentation as per: | 22 // DO NOT EDIT - unless you are editing documentation as per: |
23 // https://code.google.com/p/dart/wiki/ContributingHTMLDocumentation | 23 // https://code.google.com/p/dart/wiki/ContributingHTMLDocumentation |
24 // Auto-generated dart:audio library. | 24 // Auto-generated dart:audio library. |
25 | 25 |
26 | |
27 | |
28 | |
29 // FIXME: Can we make this private? | 26 // FIXME: Can we make this private? |
30 @Deprecated("Internal Use Only") | 27 @Deprecated("Internal Use Only") |
31 final web_sqlBlinkMap = { | 28 final web_sqlBlinkMap = { |
32 'Database': () => SqlDatabase.instanceRuntimeType, | 29 'Database': () => SqlDatabase.instanceRuntimeType, |
33 'SQLError': () => SqlError.instanceRuntimeType, | 30 'SQLError': () => SqlError.instanceRuntimeType, |
34 'SQLResultSet': () => SqlResultSet.instanceRuntimeType, | 31 'SQLResultSet': () => SqlResultSet.instanceRuntimeType, |
35 'SQLResultSetRowList': () => SqlResultSetRowList.instanceRuntimeType, | 32 'SQLResultSetRowList': () => SqlResultSetRowList.instanceRuntimeType, |
36 'SQLTransaction': () => SqlTransaction.instanceRuntimeType, | 33 'SQLTransaction': () => SqlTransaction.instanceRuntimeType, |
37 | |
38 }; | 34 }; |
39 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 35 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
40 // for details. All rights reserved. Use of this source code is governed by a | 36 // for details. All rights reserved. Use of this source code is governed by a |
41 // BSD-style license that can be found in the LICENSE file. | 37 // BSD-style license that can be found in the LICENSE file. |
42 | 38 |
43 // WARNING: Do not edit - generated code. | 39 // WARNING: Do not edit - generated code. |
44 | 40 |
45 | |
46 @DomName('SQLStatementCallback') | 41 @DomName('SQLStatementCallback') |
47 // http://www.w3.org/TR/webdatabase/#sqlstatementcallback | 42 // http://www.w3.org/TR/webdatabase/#sqlstatementcallback |
48 @Experimental() // deprecated | 43 @Experimental() // deprecated |
49 typedef void SqlStatementCallback(SqlTransaction transaction, SqlResultSet resul
tSet); | 44 typedef void SqlStatementCallback( |
| 45 SqlTransaction transaction, SqlResultSet resultSet); |
50 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 46 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
51 // for details. All rights reserved. Use of this source code is governed by a | 47 // for details. All rights reserved. Use of this source code is governed by a |
52 // BSD-style license that can be found in the LICENSE file. | 48 // BSD-style license that can be found in the LICENSE file. |
53 | 49 |
54 // WARNING: Do not edit - generated code. | 50 // WARNING: Do not edit - generated code. |
55 | 51 |
56 | |
57 @DomName('SQLStatementErrorCallback') | 52 @DomName('SQLStatementErrorCallback') |
58 // http://www.w3.org/TR/webdatabase/#sqlstatementerrorcallback | 53 // http://www.w3.org/TR/webdatabase/#sqlstatementerrorcallback |
59 @Experimental() // deprecated | 54 @Experimental() // deprecated |
60 typedef void SqlStatementErrorCallback(SqlTransaction transaction, SqlError erro
r); | 55 typedef void SqlStatementErrorCallback( |
| 56 SqlTransaction transaction, SqlError error); |
61 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 57 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
62 // for details. All rights reserved. Use of this source code is governed by a | 58 // for details. All rights reserved. Use of this source code is governed by a |
63 // BSD-style license that can be found in the LICENSE file. | 59 // BSD-style license that can be found in the LICENSE file. |
64 | 60 |
65 // WARNING: Do not edit - generated code. | 61 // WARNING: Do not edit - generated code. |
66 | 62 |
67 | |
68 @DomName('SQLTransactionCallback') | 63 @DomName('SQLTransactionCallback') |
69 // http://www.w3.org/TR/webdatabase/#sqltransactioncallback | 64 // http://www.w3.org/TR/webdatabase/#sqltransactioncallback |
70 @Experimental() // deprecated | 65 @Experimental() // deprecated |
71 typedef void SqlTransactionCallback(SqlTransaction transaction); | 66 typedef void SqlTransactionCallback(SqlTransaction transaction); |
72 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 67 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
73 // for details. All rights reserved. Use of this source code is governed by a | 68 // for details. All rights reserved. Use of this source code is governed by a |
74 // BSD-style license that can be found in the LICENSE file. | 69 // BSD-style license that can be found in the LICENSE file. |
75 | 70 |
76 // WARNING: Do not edit - generated code. | 71 // WARNING: Do not edit - generated code. |
77 | 72 |
78 | |
79 @DomName('SQLTransactionErrorCallback') | 73 @DomName('SQLTransactionErrorCallback') |
80 // http://www.w3.org/TR/webdatabase/#sqltransactionerrorcallback | 74 // http://www.w3.org/TR/webdatabase/#sqltransactionerrorcallback |
81 @Experimental() // deprecated | 75 @Experimental() // deprecated |
82 typedef void SqlTransactionErrorCallback(SqlError error); | 76 typedef void SqlTransactionErrorCallback(SqlError error); |
83 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 77 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
84 // for details. All rights reserved. Use of this source code is governed by a | 78 // for details. All rights reserved. Use of this source code is governed by a |
85 // BSD-style license that can be found in the LICENSE file. | 79 // BSD-style license that can be found in the LICENSE file. |
86 | 80 |
87 // WARNING: Do not edit - generated code. | 81 // WARNING: Do not edit - generated code. |
88 | 82 |
89 | |
90 @DocsEditable() | 83 @DocsEditable() |
91 @DomName('Database') | 84 @DomName('Database') |
92 @SupportedBrowser(SupportedBrowser.CHROME) | 85 @SupportedBrowser(SupportedBrowser.CHROME) |
93 @SupportedBrowser(SupportedBrowser.SAFARI) | 86 @SupportedBrowser(SupportedBrowser.SAFARI) |
94 @Experimental() | 87 @Experimental() |
95 // http://www.w3.org/TR/webdatabase/#asynchronous-database-api | 88 // http://www.w3.org/TR/webdatabase/#asynchronous-database-api |
96 @Experimental() // deprecated | 89 @Experimental() // deprecated |
97 class SqlDatabase extends DartHtmlDomObject { | 90 class SqlDatabase extends DartHtmlDomObject { |
98 // To suppress missing implicit constructor warnings. | 91 // To suppress missing implicit constructor warnings. |
99 factory SqlDatabase._() { throw new UnsupportedError("Not supported"); } | 92 factory SqlDatabase._() { |
100 | 93 throw new UnsupportedError("Not supported"); |
| 94 } |
101 | 95 |
102 @Deprecated("Internal Use Only") | 96 @Deprecated("Internal Use Only") |
103 external static Type get instanceRuntimeType; | 97 external static Type get instanceRuntimeType; |
104 | 98 |
105 @Deprecated("Internal Use Only") | 99 @Deprecated("Internal Use Only") |
106 SqlDatabase.internal_() { } | 100 SqlDatabase.internal_() {} |
107 | 101 |
108 /// Checks if this type is supported on the current platform. | 102 /// Checks if this type is supported on the current platform. |
109 static bool get supported => true; | 103 static bool get supported => true; |
110 | 104 |
111 @DomName('Database.version') | 105 @DomName('Database.version') |
112 @DocsEditable() | 106 @DocsEditable() |
113 String get version => _blink.BlinkDatabase.instance.version_Getter_(this); | 107 String get version => _blink.BlinkDatabase.instance.version_Getter_(this); |
114 | 108 |
115 void changeVersion(String oldVersion, String newVersion, [SqlTransactionCallba
ck callback, SqlTransactionErrorCallback errorCallback, VoidCallback successCall
back]) { | 109 void changeVersion(String oldVersion, String newVersion, |
| 110 [SqlTransactionCallback callback, |
| 111 SqlTransactionErrorCallback errorCallback, |
| 112 VoidCallback successCallback]) { |
116 if (successCallback != null) { | 113 if (successCallback != null) { |
117 _blink.BlinkDatabase.instance.changeVersion_Callback_5_(this, oldVersion,
newVersion, callback, errorCallback, successCallback); | 114 _blink.BlinkDatabase.instance.changeVersion_Callback_5_(this, oldVersion, |
| 115 newVersion, callback, errorCallback, successCallback); |
118 return; | 116 return; |
119 } | 117 } |
120 if (errorCallback != null) { | 118 if (errorCallback != null) { |
121 _blink.BlinkDatabase.instance.changeVersion_Callback_4_(this, oldVersion,
newVersion, callback, errorCallback); | 119 _blink.BlinkDatabase.instance.changeVersion_Callback_4_( |
| 120 this, oldVersion, newVersion, callback, errorCallback); |
122 return; | 121 return; |
123 } | 122 } |
124 if (callback != null) { | 123 if (callback != null) { |
125 _blink.BlinkDatabase.instance.changeVersion_Callback_3_(this, oldVersion,
newVersion, callback); | 124 _blink.BlinkDatabase.instance |
| 125 .changeVersion_Callback_3_(this, oldVersion, newVersion, callback); |
126 return; | 126 return; |
127 } | 127 } |
128 _blink.BlinkDatabase.instance.changeVersion_Callback_2_(this, oldVersion, ne
wVersion); | 128 _blink.BlinkDatabase.instance |
| 129 .changeVersion_Callback_2_(this, oldVersion, newVersion); |
129 return; | 130 return; |
130 } | 131 } |
131 | 132 |
132 void readTransaction(SqlTransactionCallback callback, [SqlTransactionErrorCall
back errorCallback, VoidCallback successCallback]) { | 133 void readTransaction(SqlTransactionCallback callback, |
| 134 [SqlTransactionErrorCallback errorCallback, |
| 135 VoidCallback successCallback]) { |
133 if (successCallback != null) { | 136 if (successCallback != null) { |
134 _blink.BlinkDatabase.instance.readTransaction_Callback_3_(this, callback,
errorCallback, successCallback); | 137 _blink.BlinkDatabase.instance.readTransaction_Callback_3_( |
| 138 this, callback, errorCallback, successCallback); |
135 return; | 139 return; |
136 } | 140 } |
137 if (errorCallback != null) { | 141 if (errorCallback != null) { |
138 _blink.BlinkDatabase.instance.readTransaction_Callback_2_(this, callback,
errorCallback); | 142 _blink.BlinkDatabase.instance |
| 143 .readTransaction_Callback_2_(this, callback, errorCallback); |
139 return; | 144 return; |
140 } | 145 } |
141 _blink.BlinkDatabase.instance.readTransaction_Callback_1_(this, callback); | 146 _blink.BlinkDatabase.instance.readTransaction_Callback_1_(this, callback); |
142 return; | 147 return; |
143 } | 148 } |
144 | 149 |
145 void transaction(SqlTransactionCallback callback, [SqlTransactionErrorCallback
errorCallback, VoidCallback successCallback]) { | 150 void transaction(SqlTransactionCallback callback, |
| 151 [SqlTransactionErrorCallback errorCallback, |
| 152 VoidCallback successCallback]) { |
146 if (successCallback != null) { | 153 if (successCallback != null) { |
147 _blink.BlinkDatabase.instance.transaction_Callback_3_(this, callback, erro
rCallback, successCallback); | 154 _blink.BlinkDatabase.instance.transaction_Callback_3_( |
| 155 this, callback, errorCallback, successCallback); |
148 return; | 156 return; |
149 } | 157 } |
150 if (errorCallback != null) { | 158 if (errorCallback != null) { |
151 _blink.BlinkDatabase.instance.transaction_Callback_2_(this, callback, erro
rCallback); | 159 _blink.BlinkDatabase.instance |
| 160 .transaction_Callback_2_(this, callback, errorCallback); |
152 return; | 161 return; |
153 } | 162 } |
154 _blink.BlinkDatabase.instance.transaction_Callback_1_(this, callback); | 163 _blink.BlinkDatabase.instance.transaction_Callback_1_(this, callback); |
155 return; | 164 return; |
156 } | 165 } |
157 | |
158 } | 166 } |
159 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 167 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
160 // for details. All rights reserved. Use of this source code is governed by a | 168 // for details. All rights reserved. Use of this source code is governed by a |
161 // BSD-style license that can be found in the LICENSE file. | 169 // BSD-style license that can be found in the LICENSE file. |
162 | 170 |
163 // WARNING: Do not edit - generated code. | 171 // WARNING: Do not edit - generated code. |
164 | 172 |
165 | |
166 @DocsEditable() | 173 @DocsEditable() |
167 @DomName('SQLError') | 174 @DomName('SQLError') |
168 // http://www.w3.org/TR/webdatabase/#sqlerror | 175 // http://www.w3.org/TR/webdatabase/#sqlerror |
169 @Experimental() // deprecated | 176 @Experimental() // deprecated |
170 class SqlError extends DartHtmlDomObject { | 177 class SqlError extends DartHtmlDomObject { |
171 // To suppress missing implicit constructor warnings. | 178 // To suppress missing implicit constructor warnings. |
172 factory SqlError._() { throw new UnsupportedError("Not supported"); } | 179 factory SqlError._() { |
173 | 180 throw new UnsupportedError("Not supported"); |
| 181 } |
174 | 182 |
175 @Deprecated("Internal Use Only") | 183 @Deprecated("Internal Use Only") |
176 external static Type get instanceRuntimeType; | 184 external static Type get instanceRuntimeType; |
177 | 185 |
178 @Deprecated("Internal Use Only") | 186 @Deprecated("Internal Use Only") |
179 SqlError.internal_() { } | 187 SqlError.internal_() {} |
180 | 188 |
181 @DomName('SQLError.CONSTRAINT_ERR') | 189 @DomName('SQLError.CONSTRAINT_ERR') |
182 @DocsEditable() | 190 @DocsEditable() |
183 static const int CONSTRAINT_ERR = 6; | 191 static const int CONSTRAINT_ERR = 6; |
184 | 192 |
185 @DomName('SQLError.DATABASE_ERR') | 193 @DomName('SQLError.DATABASE_ERR') |
186 @DocsEditable() | 194 @DocsEditable() |
187 static const int DATABASE_ERR = 1; | 195 static const int DATABASE_ERR = 1; |
188 | 196 |
189 @DomName('SQLError.QUOTA_ERR') | 197 @DomName('SQLError.QUOTA_ERR') |
(...skipping 16 matching lines...) Expand all Loading... |
206 @DocsEditable() | 214 @DocsEditable() |
207 static const int UNKNOWN_ERR = 0; | 215 static const int UNKNOWN_ERR = 0; |
208 | 216 |
209 @DomName('SQLError.VERSION_ERR') | 217 @DomName('SQLError.VERSION_ERR') |
210 @DocsEditable() | 218 @DocsEditable() |
211 static const int VERSION_ERR = 2; | 219 static const int VERSION_ERR = 2; |
212 | 220 |
213 @DomName('SQLError.code') | 221 @DomName('SQLError.code') |
214 @DocsEditable() | 222 @DocsEditable() |
215 int get code => _blink.BlinkSQLError.instance.code_Getter_(this); | 223 int get code => _blink.BlinkSQLError.instance.code_Getter_(this); |
216 | 224 |
217 @DomName('SQLError.message') | 225 @DomName('SQLError.message') |
218 @DocsEditable() | 226 @DocsEditable() |
219 String get message => _blink.BlinkSQLError.instance.message_Getter_(this); | 227 String get message => _blink.BlinkSQLError.instance.message_Getter_(this); |
220 | |
221 } | 228 } |
222 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 229 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
223 // for details. All rights reserved. Use of this source code is governed by a | 230 // for details. All rights reserved. Use of this source code is governed by a |
224 // BSD-style license that can be found in the LICENSE file. | 231 // BSD-style license that can be found in the LICENSE file. |
225 | 232 |
226 // WARNING: Do not edit - generated code. | 233 // WARNING: Do not edit - generated code. |
227 | 234 |
228 | |
229 @DocsEditable() | 235 @DocsEditable() |
230 @DomName('SQLResultSet') | 236 @DomName('SQLResultSet') |
231 // http://www.w3.org/TR/webdatabase/#sqlresultset | 237 // http://www.w3.org/TR/webdatabase/#sqlresultset |
232 @Experimental() // deprecated | 238 @Experimental() // deprecated |
233 class SqlResultSet extends DartHtmlDomObject { | 239 class SqlResultSet extends DartHtmlDomObject { |
234 // To suppress missing implicit constructor warnings. | 240 // To suppress missing implicit constructor warnings. |
235 factory SqlResultSet._() { throw new UnsupportedError("Not supported"); } | 241 factory SqlResultSet._() { |
236 | 242 throw new UnsupportedError("Not supported"); |
| 243 } |
237 | 244 |
238 @Deprecated("Internal Use Only") | 245 @Deprecated("Internal Use Only") |
239 external static Type get instanceRuntimeType; | 246 external static Type get instanceRuntimeType; |
240 | 247 |
241 @Deprecated("Internal Use Only") | 248 @Deprecated("Internal Use Only") |
242 SqlResultSet.internal_() { } | 249 SqlResultSet.internal_() {} |
243 | 250 |
244 @DomName('SQLResultSet.insertId') | 251 @DomName('SQLResultSet.insertId') |
245 @DocsEditable() | 252 @DocsEditable() |
246 int get insertId => _blink.BlinkSQLResultSet.instance.insertId_Getter_(this); | 253 int get insertId => _blink.BlinkSQLResultSet.instance.insertId_Getter_(this); |
247 | 254 |
248 @DomName('SQLResultSet.rows') | 255 @DomName('SQLResultSet.rows') |
249 @DocsEditable() | 256 @DocsEditable() |
250 SqlResultSetRowList get rows => _blink.BlinkSQLResultSet.instance.rows_Getter_
(this); | 257 SqlResultSetRowList get rows => |
251 | 258 _blink.BlinkSQLResultSet.instance.rows_Getter_(this); |
| 259 |
252 @DomName('SQLResultSet.rowsAffected') | 260 @DomName('SQLResultSet.rowsAffected') |
253 @DocsEditable() | 261 @DocsEditable() |
254 int get rowsAffected => _blink.BlinkSQLResultSet.instance.rowsAffected_Getter_
(this); | 262 int get rowsAffected => |
255 | 263 _blink.BlinkSQLResultSet.instance.rowsAffected_Getter_(this); |
256 } | 264 } |
257 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 265 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
258 // for details. All rights reserved. Use of this source code is governed by a | 266 // for details. All rights reserved. Use of this source code is governed by a |
259 // BSD-style license that can be found in the LICENSE file. | 267 // BSD-style license that can be found in the LICENSE file. |
260 | 268 |
261 // WARNING: Do not edit - generated code. | 269 // WARNING: Do not edit - generated code. |
262 | 270 |
263 | |
264 @DocsEditable() | 271 @DocsEditable() |
265 @DomName('SQLResultSetRowList') | 272 @DomName('SQLResultSetRowList') |
266 // http://www.w3.org/TR/webdatabase/#sqlresultsetrowlist | 273 // http://www.w3.org/TR/webdatabase/#sqlresultsetrowlist |
267 @Experimental() // deprecated | 274 @Experimental() // deprecated |
268 class SqlResultSetRowList extends DartHtmlDomObject with ListMixin<Map>, Immutab
leListMixin<Map> implements List<Map> { | 275 class SqlResultSetRowList extends DartHtmlDomObject |
| 276 with ListMixin<Map>, ImmutableListMixin<Map> |
| 277 implements List<Map> { |
269 // To suppress missing implicit constructor warnings. | 278 // To suppress missing implicit constructor warnings. |
270 factory SqlResultSetRowList._() { throw new UnsupportedError("Not supported");
} | 279 factory SqlResultSetRowList._() { |
271 | 280 throw new UnsupportedError("Not supported"); |
| 281 } |
272 | 282 |
273 @Deprecated("Internal Use Only") | 283 @Deprecated("Internal Use Only") |
274 external static Type get instanceRuntimeType; | 284 external static Type get instanceRuntimeType; |
275 | 285 |
276 @Deprecated("Internal Use Only") | 286 @Deprecated("Internal Use Only") |
277 SqlResultSetRowList.internal_() { } | 287 SqlResultSetRowList.internal_() {} |
278 | 288 |
279 @DomName('SQLResultSetRowList.length') | 289 @DomName('SQLResultSetRowList.length') |
280 @DocsEditable() | 290 @DocsEditable() |
281 int get length => _blink.BlinkSQLResultSetRowList.instance.length_Getter_(this
); | 291 int get length => |
282 | 292 _blink.BlinkSQLResultSetRowList.instance.length_Getter_(this); |
283 Map operator[](int index) { | 293 |
284 if (index < 0 || index >= length) | 294 Map operator [](int index) { |
285 throw new RangeError.index(index, this); | 295 if (index < 0 || index >= length) throw new RangeError.index(index, this); |
286 return _nativeIndexedGetter(index); | 296 return _nativeIndexedGetter(index); |
287 } | 297 } |
288 | 298 |
289 Map _nativeIndexedGetter(int index) => convertNativeToDart_Dictionary(_blink.B
linkSQLResultSetRowList.instance.item_Callback_1_(this, index)); | 299 Map _nativeIndexedGetter(int index) => convertNativeToDart_Dictionary( |
| 300 _blink.BlinkSQLResultSetRowList.instance.item_Callback_1_(this, index)); |
290 | 301 |
291 void operator[]=(int index, Map value) { | 302 void operator []=(int index, Map value) { |
292 throw new UnsupportedError("Cannot assign element of immutable List."); | 303 throw new UnsupportedError("Cannot assign element of immutable List."); |
293 } | 304 } |
294 // -- start List<Map> mixins. | 305 // -- start List<Map> mixins. |
295 // Map is the element type. | 306 // Map is the element type. |
296 | 307 |
297 | |
298 set length(int value) { | 308 set length(int value) { |
299 throw new UnsupportedError("Cannot resize immutable List."); | 309 throw new UnsupportedError("Cannot resize immutable List."); |
300 } | 310 } |
301 | 311 |
302 Map get first { | 312 Map get first { |
303 if (this.length > 0) { | 313 if (this.length > 0) { |
304 return _nativeIndexedGetter(0); | 314 return _nativeIndexedGetter(0); |
305 } | 315 } |
306 throw new StateError("No elements"); | 316 throw new StateError("No elements"); |
307 } | 317 } |
(...skipping 13 matching lines...) Expand all Loading... |
321 } | 331 } |
322 if (len == 0) throw new StateError("No elements"); | 332 if (len == 0) throw new StateError("No elements"); |
323 throw new StateError("More than one element"); | 333 throw new StateError("More than one element"); |
324 } | 334 } |
325 | 335 |
326 Map elementAt(int index) => this[index]; | 336 Map elementAt(int index) => this[index]; |
327 // -- end List<Map> mixins. | 337 // -- end List<Map> mixins. |
328 | 338 |
329 @DomName('SQLResultSetRowList.item') | 339 @DomName('SQLResultSetRowList.item') |
330 @DocsEditable() | 340 @DocsEditable() |
331 Object item(int index) => convertNativeToDart_Dictionary(_blink.BlinkSQLResult
SetRowList.instance.item_Callback_1_(this, index)); | 341 Object item(int index) => convertNativeToDart_Dictionary( |
332 | 342 _blink.BlinkSQLResultSetRowList.instance.item_Callback_1_(this, index)); |
333 } | 343 } |
334 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 344 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
335 // for details. All rights reserved. Use of this source code is governed by a | 345 // for details. All rights reserved. Use of this source code is governed by a |
336 // BSD-style license that can be found in the LICENSE file. | 346 // BSD-style license that can be found in the LICENSE file. |
337 | 347 |
338 // WARNING: Do not edit - generated code. | 348 // WARNING: Do not edit - generated code. |
339 | 349 |
340 | |
341 @DocsEditable() | 350 @DocsEditable() |
342 @DomName('SQLTransaction') | 351 @DomName('SQLTransaction') |
343 @SupportedBrowser(SupportedBrowser.CHROME) | 352 @SupportedBrowser(SupportedBrowser.CHROME) |
344 @SupportedBrowser(SupportedBrowser.SAFARI) | 353 @SupportedBrowser(SupportedBrowser.SAFARI) |
345 @Experimental() | 354 @Experimental() |
346 // http://www.w3.org/TR/webdatabase/#sqltransaction | 355 // http://www.w3.org/TR/webdatabase/#sqltransaction |
347 @deprecated // deprecated | 356 @deprecated // deprecated |
348 class SqlTransaction extends DartHtmlDomObject { | 357 class SqlTransaction extends DartHtmlDomObject { |
349 // To suppress missing implicit constructor warnings. | 358 // To suppress missing implicit constructor warnings. |
350 factory SqlTransaction._() { throw new UnsupportedError("Not supported"); } | 359 factory SqlTransaction._() { |
351 | 360 throw new UnsupportedError("Not supported"); |
| 361 } |
352 | 362 |
353 @Deprecated("Internal Use Only") | 363 @Deprecated("Internal Use Only") |
354 external static Type get instanceRuntimeType; | 364 external static Type get instanceRuntimeType; |
355 | 365 |
356 @Deprecated("Internal Use Only") | 366 @Deprecated("Internal Use Only") |
357 SqlTransaction.internal_() { } | 367 SqlTransaction.internal_() {} |
358 | 368 |
359 void executeSql(String sqlStatement, [List arguments, SqlStatementCallback cal
lback, SqlStatementErrorCallback errorCallback]) { | 369 void executeSql(String sqlStatement, |
| 370 [List arguments, |
| 371 SqlStatementCallback callback, |
| 372 SqlStatementErrorCallback errorCallback]) { |
360 if (errorCallback != null) { | 373 if (errorCallback != null) { |
361 _blink.BlinkSQLTransaction.instance.executeSql_Callback_4_(this, sqlStatem
ent, arguments, callback, errorCallback); | 374 _blink.BlinkSQLTransaction.instance.executeSql_Callback_4_( |
| 375 this, sqlStatement, arguments, callback, errorCallback); |
362 return; | 376 return; |
363 } | 377 } |
364 if (callback != null) { | 378 if (callback != null) { |
365 _blink.BlinkSQLTransaction.instance.executeSql_Callback_3_(this, sqlStatem
ent, arguments, callback); | 379 _blink.BlinkSQLTransaction.instance |
| 380 .executeSql_Callback_3_(this, sqlStatement, arguments, callback); |
366 return; | 381 return; |
367 } | 382 } |
368 if (arguments != null) { | 383 if (arguments != null) { |
369 _blink.BlinkSQLTransaction.instance.executeSql_Callback_2_(this, sqlStatem
ent, arguments); | 384 _blink.BlinkSQLTransaction.instance |
| 385 .executeSql_Callback_2_(this, sqlStatement, arguments); |
370 return; | 386 return; |
371 } | 387 } |
372 _blink.BlinkSQLTransaction.instance.executeSql_Callback_1_(this, sqlStatemen
t); | 388 _blink.BlinkSQLTransaction.instance |
| 389 .executeSql_Callback_1_(this, sqlStatement); |
373 return; | 390 return; |
374 } | 391 } |
375 | |
376 } | 392 } |
OLD | NEW |