OLD | NEW |
1 library indexed_db; | 1 library indexed_db; |
2 | 2 |
3 import 'dart:html'; | 3 import 'dart:html'; |
4 import 'dart:html_common'; | 4 import 'dart:html_common'; |
5 import 'dart:nativewrappers'; | 5 import 'dart:nativewrappers'; |
6 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 6 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
7 // for details. All rights reserved. Use of this source code is governed by a | 7 // for details. All rights reserved. Use of this source code is governed by a |
8 // BSD-style license that can be found in the LICENSE file. | 8 // BSD-style license that can be found in the LICENSE file. |
9 | 9 |
10 // DO NOT EDIT | 10 // DO NOT EDIT |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 Transaction transaction(storeName_OR_storeNames, /*DOMString*/ mode) { | 158 Transaction transaction(storeName_OR_storeNames, /*DOMString*/ mode) { |
159 if ((storeName_OR_storeNames is List<String> || storeName_OR_storeNames == n
ull) && (mode is String || mode == null)) { | 159 if ((storeName_OR_storeNames is List<String> || storeName_OR_storeNames == n
ull) && (mode is String || mode == null)) { |
160 return _transaction_1(storeName_OR_storeNames, mode); | 160 return _transaction_1(storeName_OR_storeNames, mode); |
161 } | 161 } |
162 if ((storeName_OR_storeNames is List<String> || storeName_OR_storeNames == n
ull) && (mode is String || mode == null)) { | 162 if ((storeName_OR_storeNames is List<String> || storeName_OR_storeNames == n
ull) && (mode is String || mode == null)) { |
163 return _transaction_2(storeName_OR_storeNames, mode); | 163 return _transaction_2(storeName_OR_storeNames, mode); |
164 } | 164 } |
165 if ((storeName_OR_storeNames is String || storeName_OR_storeNames == null) &
& (mode is String || mode == null)) { | 165 if ((storeName_OR_storeNames is String || storeName_OR_storeNames == null) &
& (mode is String || mode == null)) { |
166 return _transaction_3(storeName_OR_storeNames, mode); | 166 return _transaction_3(storeName_OR_storeNames, mode); |
167 } | 167 } |
168 throw "Incorrect number or type of arguments"; | 168 throw new ArgumentError("Incorrect number or type of arguments"); |
169 } | 169 } |
170 | 170 |
171 | 171 |
172 /** @domName IDBDatabase.transaction_1 */ | 172 /** @domName IDBDatabase.transaction_1 */ |
173 Transaction _transaction_1(storeName_OR_storeNames, mode) native "IDBDatabase_
transaction_1_Callback"; | 173 Transaction _transaction_1(storeName_OR_storeNames, mode) native "IDBDatabase_
transaction_1_Callback"; |
174 | 174 |
175 | 175 |
176 /** @domName IDBDatabase.transaction_2 */ | 176 /** @domName IDBDatabase.transaction_2 */ |
177 Transaction _transaction_2(storeName_OR_storeNames, mode) native "IDBDatabase_
transaction_2_Callback"; | 177 Transaction _transaction_2(storeName_OR_storeNames, mode) native "IDBDatabase_
transaction_2_Callback"; |
178 | 178 |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 Request count([key_OR_range]) { | 278 Request count([key_OR_range]) { |
279 if (!?key_OR_range) { | 279 if (!?key_OR_range) { |
280 return _count_1(); | 280 return _count_1(); |
281 } | 281 } |
282 if ((key_OR_range is KeyRange || key_OR_range == null)) { | 282 if ((key_OR_range is KeyRange || key_OR_range == null)) { |
283 return _count_2(key_OR_range); | 283 return _count_2(key_OR_range); |
284 } | 284 } |
285 if (?key_OR_range) { | 285 if (?key_OR_range) { |
286 return _count_3(key_OR_range); | 286 return _count_3(key_OR_range); |
287 } | 287 } |
288 throw "Incorrect number or type of arguments"; | 288 throw new ArgumentError("Incorrect number or type of arguments"); |
289 } | 289 } |
290 | 290 |
291 | 291 |
292 /** @domName IDBIndex.count_1 */ | 292 /** @domName IDBIndex.count_1 */ |
293 Request _count_1() native "IDBIndex_count_1_Callback"; | 293 Request _count_1() native "IDBIndex_count_1_Callback"; |
294 | 294 |
295 | 295 |
296 /** @domName IDBIndex.count_2 */ | 296 /** @domName IDBIndex.count_2 */ |
297 Request _count_2(key_OR_range) native "IDBIndex_count_2_Callback"; | 297 Request _count_2(key_OR_range) native "IDBIndex_count_2_Callback"; |
298 | 298 |
299 | 299 |
300 /** @domName IDBIndex.count_3 */ | 300 /** @domName IDBIndex.count_3 */ |
301 Request _count_3(key_OR_range) native "IDBIndex_count_3_Callback"; | 301 Request _count_3(key_OR_range) native "IDBIndex_count_3_Callback"; |
302 | 302 |
303 Request get(key) { | 303 Request get(key) { |
304 if ((key is KeyRange || key == null)) { | 304 if ((key is KeyRange || key == null)) { |
305 return _get_1(key); | 305 return _get_1(key); |
306 } | 306 } |
307 if (?key) { | 307 if (?key) { |
308 return _get_2(key); | 308 return _get_2(key); |
309 } | 309 } |
310 throw "Incorrect number or type of arguments"; | 310 throw new ArgumentError("Incorrect number or type of arguments"); |
311 } | 311 } |
312 | 312 |
313 | 313 |
314 /** @domName IDBIndex.get_1 */ | 314 /** @domName IDBIndex.get_1 */ |
315 Request _get_1(key) native "IDBIndex_get_1_Callback"; | 315 Request _get_1(key) native "IDBIndex_get_1_Callback"; |
316 | 316 |
317 | 317 |
318 /** @domName IDBIndex.get_2 */ | 318 /** @domName IDBIndex.get_2 */ |
319 Request _get_2(key) native "IDBIndex_get_2_Callback"; | 319 Request _get_2(key) native "IDBIndex_get_2_Callback"; |
320 | 320 |
321 Request getKey(key) { | 321 Request getKey(key) { |
322 if ((key is KeyRange || key == null)) { | 322 if ((key is KeyRange || key == null)) { |
323 return _getKey_1(key); | 323 return _getKey_1(key); |
324 } | 324 } |
325 if (?key) { | 325 if (?key) { |
326 return _getKey_2(key); | 326 return _getKey_2(key); |
327 } | 327 } |
328 throw "Incorrect number or type of arguments"; | 328 throw new ArgumentError("Incorrect number or type of arguments"); |
329 } | 329 } |
330 | 330 |
331 | 331 |
332 /** @domName IDBIndex.getKey_1 */ | 332 /** @domName IDBIndex.getKey_1 */ |
333 Request _getKey_1(key) native "IDBIndex_getKey_1_Callback"; | 333 Request _getKey_1(key) native "IDBIndex_getKey_1_Callback"; |
334 | 334 |
335 | 335 |
336 /** @domName IDBIndex.getKey_2 */ | 336 /** @domName IDBIndex.getKey_2 */ |
337 Request _getKey_2(key) native "IDBIndex_getKey_2_Callback"; | 337 Request _getKey_2(key) native "IDBIndex_getKey_2_Callback"; |
338 | 338 |
339 Request openCursor([key_OR_range, /*DOMString*/ direction]) { | 339 Request openCursor([key_OR_range, /*DOMString*/ direction]) { |
340 if (!?key_OR_range && !?direction) { | 340 if (!?key_OR_range && !?direction) { |
341 return _openCursor_1(); | 341 return _openCursor_1(); |
342 } | 342 } |
343 if ((key_OR_range is KeyRange || key_OR_range == null) && !?direction) { | 343 if ((key_OR_range is KeyRange || key_OR_range == null) && !?direction) { |
344 return _openCursor_2(key_OR_range); | 344 return _openCursor_2(key_OR_range); |
345 } | 345 } |
346 if ((key_OR_range is KeyRange || key_OR_range == null) && (direction is Stri
ng || direction == null)) { | 346 if ((key_OR_range is KeyRange || key_OR_range == null) && (direction is Stri
ng || direction == null)) { |
347 return _openCursor_3(key_OR_range, direction); | 347 return _openCursor_3(key_OR_range, direction); |
348 } | 348 } |
349 if (?key_OR_range && !?direction) { | 349 if (?key_OR_range && !?direction) { |
350 return _openCursor_4(key_OR_range); | 350 return _openCursor_4(key_OR_range); |
351 } | 351 } |
352 if (?key_OR_range && (direction is String || direction == null)) { | 352 if (?key_OR_range && (direction is String || direction == null)) { |
353 return _openCursor_5(key_OR_range, direction); | 353 return _openCursor_5(key_OR_range, direction); |
354 } | 354 } |
355 throw "Incorrect number or type of arguments"; | 355 throw new ArgumentError("Incorrect number or type of arguments"); |
356 } | 356 } |
357 | 357 |
358 | 358 |
359 /** @domName IDBIndex.openCursor_1 */ | 359 /** @domName IDBIndex.openCursor_1 */ |
360 Request _openCursor_1() native "IDBIndex_openCursor_1_Callback"; | 360 Request _openCursor_1() native "IDBIndex_openCursor_1_Callback"; |
361 | 361 |
362 | 362 |
363 /** @domName IDBIndex.openCursor_2 */ | 363 /** @domName IDBIndex.openCursor_2 */ |
364 Request _openCursor_2(key_OR_range) native "IDBIndex_openCursor_2_Callback"; | 364 Request _openCursor_2(key_OR_range) native "IDBIndex_openCursor_2_Callback"; |
365 | 365 |
(...skipping 18 matching lines...) Expand all Loading... |
384 } | 384 } |
385 if ((key_OR_range is KeyRange || key_OR_range == null) && (direction is Stri
ng || direction == null)) { | 385 if ((key_OR_range is KeyRange || key_OR_range == null) && (direction is Stri
ng || direction == null)) { |
386 return _openKeyCursor_3(key_OR_range, direction); | 386 return _openKeyCursor_3(key_OR_range, direction); |
387 } | 387 } |
388 if (?key_OR_range && !?direction) { | 388 if (?key_OR_range && !?direction) { |
389 return _openKeyCursor_4(key_OR_range); | 389 return _openKeyCursor_4(key_OR_range); |
390 } | 390 } |
391 if (?key_OR_range && (direction is String || direction == null)) { | 391 if (?key_OR_range && (direction is String || direction == null)) { |
392 return _openKeyCursor_5(key_OR_range, direction); | 392 return _openKeyCursor_5(key_OR_range, direction); |
393 } | 393 } |
394 throw "Incorrect number or type of arguments"; | 394 throw new ArgumentError("Incorrect number or type of arguments"); |
395 } | 395 } |
396 | 396 |
397 | 397 |
398 /** @domName IDBIndex.openKeyCursor_1 */ | 398 /** @domName IDBIndex.openKeyCursor_1 */ |
399 Request _openKeyCursor_1() native "IDBIndex_openKeyCursor_1_Callback"; | 399 Request _openKeyCursor_1() native "IDBIndex_openKeyCursor_1_Callback"; |
400 | 400 |
401 | 401 |
402 /** @domName IDBIndex.openKeyCursor_2 */ | 402 /** @domName IDBIndex.openKeyCursor_2 */ |
403 Request _openKeyCursor_2(key_OR_range) native "IDBIndex_openKeyCursor_2_Callba
ck"; | 403 Request _openKeyCursor_2(key_OR_range) native "IDBIndex_openKeyCursor_2_Callba
ck"; |
404 | 404 |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
588 Request count([key_OR_range]) { | 588 Request count([key_OR_range]) { |
589 if (!?key_OR_range) { | 589 if (!?key_OR_range) { |
590 return _count_1(); | 590 return _count_1(); |
591 } | 591 } |
592 if ((key_OR_range is KeyRange || key_OR_range == null)) { | 592 if ((key_OR_range is KeyRange || key_OR_range == null)) { |
593 return _count_2(key_OR_range); | 593 return _count_2(key_OR_range); |
594 } | 594 } |
595 if (?key_OR_range) { | 595 if (?key_OR_range) { |
596 return _count_3(key_OR_range); | 596 return _count_3(key_OR_range); |
597 } | 597 } |
598 throw "Incorrect number or type of arguments"; | 598 throw new ArgumentError("Incorrect number or type of arguments"); |
599 } | 599 } |
600 | 600 |
601 | 601 |
602 /** @domName IDBObjectStore.count_1 */ | 602 /** @domName IDBObjectStore.count_1 */ |
603 Request _count_1() native "IDBObjectStore_count_1_Callback"; | 603 Request _count_1() native "IDBObjectStore_count_1_Callback"; |
604 | 604 |
605 | 605 |
606 /** @domName IDBObjectStore.count_2 */ | 606 /** @domName IDBObjectStore.count_2 */ |
607 Request _count_2(key_OR_range) native "IDBObjectStore_count_2_Callback"; | 607 Request _count_2(key_OR_range) native "IDBObjectStore_count_2_Callback"; |
608 | 608 |
609 | 609 |
610 /** @domName IDBObjectStore.count_3 */ | 610 /** @domName IDBObjectStore.count_3 */ |
611 Request _count_3(key_OR_range) native "IDBObjectStore_count_3_Callback"; | 611 Request _count_3(key_OR_range) native "IDBObjectStore_count_3_Callback"; |
612 | 612 |
613 Index createIndex(/*DOMString*/ name, keyPath, [/*Dictionary*/ options]) { | 613 Index createIndex(/*DOMString*/ name, keyPath, [/*Dictionary*/ options]) { |
614 if ((name is String || name == null) && (keyPath is List<String> || keyPath
== null) && (options is Map || options == null)) { | 614 if ((name is String || name == null) && (keyPath is List<String> || keyPath
== null) && (options is Map || options == null)) { |
615 return _createIndex_1(name, keyPath, options); | 615 return _createIndex_1(name, keyPath, options); |
616 } | 616 } |
617 if ((name is String || name == null) && (keyPath is String || keyPath == nul
l) && (options is Map || options == null)) { | 617 if ((name is String || name == null) && (keyPath is String || keyPath == nul
l) && (options is Map || options == null)) { |
618 return _createIndex_2(name, keyPath, options); | 618 return _createIndex_2(name, keyPath, options); |
619 } | 619 } |
620 throw "Incorrect number or type of arguments"; | 620 throw new ArgumentError("Incorrect number or type of arguments"); |
621 } | 621 } |
622 | 622 |
623 | 623 |
624 /** @domName IDBObjectStore.createIndex_1 */ | 624 /** @domName IDBObjectStore.createIndex_1 */ |
625 Index _createIndex_1(name, keyPath, options) native "IDBObjectStore_createInde
x_1_Callback"; | 625 Index _createIndex_1(name, keyPath, options) native "IDBObjectStore_createInde
x_1_Callback"; |
626 | 626 |
627 | 627 |
628 /** @domName IDBObjectStore.createIndex_2 */ | 628 /** @domName IDBObjectStore.createIndex_2 */ |
629 Index _createIndex_2(name, keyPath, options) native "IDBObjectStore_createInde
x_2_Callback"; | 629 Index _createIndex_2(name, keyPath, options) native "IDBObjectStore_createInde
x_2_Callback"; |
630 | 630 |
631 Request delete(key_OR_keyRange) { | 631 Request delete(key_OR_keyRange) { |
632 if ((key_OR_keyRange is KeyRange || key_OR_keyRange == null)) { | 632 if ((key_OR_keyRange is KeyRange || key_OR_keyRange == null)) { |
633 return _delete_1(key_OR_keyRange); | 633 return _delete_1(key_OR_keyRange); |
634 } | 634 } |
635 if (?key_OR_keyRange) { | 635 if (?key_OR_keyRange) { |
636 return _delete_2(key_OR_keyRange); | 636 return _delete_2(key_OR_keyRange); |
637 } | 637 } |
638 throw "Incorrect number or type of arguments"; | 638 throw new ArgumentError("Incorrect number or type of arguments"); |
639 } | 639 } |
640 | 640 |
641 | 641 |
642 /** @domName IDBObjectStore.delete_1 */ | 642 /** @domName IDBObjectStore.delete_1 */ |
643 Request _delete_1(key_OR_keyRange) native "IDBObjectStore_delete_1_Callback"; | 643 Request _delete_1(key_OR_keyRange) native "IDBObjectStore_delete_1_Callback"; |
644 | 644 |
645 | 645 |
646 /** @domName IDBObjectStore.delete_2 */ | 646 /** @domName IDBObjectStore.delete_2 */ |
647 Request _delete_2(key_OR_keyRange) native "IDBObjectStore_delete_2_Callback"; | 647 Request _delete_2(key_OR_keyRange) native "IDBObjectStore_delete_2_Callback"; |
648 | 648 |
649 | 649 |
650 /** @domName IDBObjectStore.deleteIndex */ | 650 /** @domName IDBObjectStore.deleteIndex */ |
651 void deleteIndex(String name) native "IDBObjectStore_deleteIndex_Callback"; | 651 void deleteIndex(String name) native "IDBObjectStore_deleteIndex_Callback"; |
652 | 652 |
653 Request getObject(key) { | 653 Request getObject(key) { |
654 if ((key is KeyRange || key == null)) { | 654 if ((key is KeyRange || key == null)) { |
655 return _get_1(key); | 655 return _get_1(key); |
656 } | 656 } |
657 if (?key) { | 657 if (?key) { |
658 return _get_2(key); | 658 return _get_2(key); |
659 } | 659 } |
660 throw "Incorrect number or type of arguments"; | 660 throw new ArgumentError("Incorrect number or type of arguments"); |
661 } | 661 } |
662 | 662 |
663 | 663 |
664 /** @domName IDBObjectStore.get_1 */ | 664 /** @domName IDBObjectStore.get_1 */ |
665 Request _get_1(key) native "IDBObjectStore_get_1_Callback"; | 665 Request _get_1(key) native "IDBObjectStore_get_1_Callback"; |
666 | 666 |
667 | 667 |
668 /** @domName IDBObjectStore.get_2 */ | 668 /** @domName IDBObjectStore.get_2 */ |
669 Request _get_2(key) native "IDBObjectStore_get_2_Callback"; | 669 Request _get_2(key) native "IDBObjectStore_get_2_Callback"; |
670 | 670 |
(...skipping 10 matching lines...) Expand all Loading... |
681 } | 681 } |
682 if ((key_OR_range is KeyRange || key_OR_range == null) && (direction is Stri
ng || direction == null)) { | 682 if ((key_OR_range is KeyRange || key_OR_range == null) && (direction is Stri
ng || direction == null)) { |
683 return _openCursor_3(key_OR_range, direction); | 683 return _openCursor_3(key_OR_range, direction); |
684 } | 684 } |
685 if (?key_OR_range && !?direction) { | 685 if (?key_OR_range && !?direction) { |
686 return _openCursor_4(key_OR_range); | 686 return _openCursor_4(key_OR_range); |
687 } | 687 } |
688 if (?key_OR_range && (direction is String || direction == null)) { | 688 if (?key_OR_range && (direction is String || direction == null)) { |
689 return _openCursor_5(key_OR_range, direction); | 689 return _openCursor_5(key_OR_range, direction); |
690 } | 690 } |
691 throw "Incorrect number or type of arguments"; | 691 throw new ArgumentError("Incorrect number or type of arguments"); |
692 } | 692 } |
693 | 693 |
694 | 694 |
695 /** @domName IDBObjectStore.openCursor_1 */ | 695 /** @domName IDBObjectStore.openCursor_1 */ |
696 Request _openCursor_1() native "IDBObjectStore_openCursor_1_Callback"; | 696 Request _openCursor_1() native "IDBObjectStore_openCursor_1_Callback"; |
697 | 697 |
698 | 698 |
699 /** @domName IDBObjectStore.openCursor_2 */ | 699 /** @domName IDBObjectStore.openCursor_2 */ |
700 Request _openCursor_2(key_OR_range) native "IDBObjectStore_openCursor_2_Callba
ck"; | 700 Request _openCursor_2(key_OR_range) native "IDBObjectStore_openCursor_2_Callba
ck"; |
701 | 701 |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
952 // BSD-style license that can be found in the LICENSE file. | 952 // BSD-style license that can be found in the LICENSE file. |
953 | 953 |
954 // WARNING: Do not edit - generated code. | 954 // WARNING: Do not edit - generated code. |
955 | 955 |
956 | 956 |
957 /// @domName IDBAny | 957 /// @domName IDBAny |
958 class _Any extends NativeFieldWrapperClass1 { | 958 class _Any extends NativeFieldWrapperClass1 { |
959 _Any.internal(); | 959 _Any.internal(); |
960 | 960 |
961 } | 961 } |
OLD | NEW |