Database class

An indexed database object for storing client-side data in web apps.

An indexed database object for storing client-side data in web apps.

Annotated by:
  • DocsEditable()
  • DomName('IDBDatabase')
  • SupportedBrowser(SupportedBrowser.CHROME)
  • SupportedBrowser(SupportedBrowser.FIREFOX, '15')
  • SupportedBrowser(SupportedBrowser.IE, '10')
  • Experimental()
  • Unstable()
Extends:

Constants

abortEvent = const EventStreamProvider<Event>('abort')
Static factory designed to expose abort events to event handlers that are not necessarily instances of Database.
closeEvent = const EventStreamProvider<Event>('close')
Static factory designed to expose close events to event handlers that are not necessarily instances of Database.
errorEvent = const EventStreamProvider<Event>('error')
Static factory designed to expose error events to event handlers that are not necessarily instances of Database.
versionChangeEvent = const EventStreamProvider<VersionChangeEvent>('versionchange')
Static factory designed to expose versionchange events to event handlers that are not necessarily instances of Database.

Instance Properties

name String
read-only
objectStoreNames List<String>
read-only
version Object
read-only
onAbort Stream<Event>
read-only
onClose Stream<Event>
read-only
onError Stream<Event>
read-only
onVersionChange Stream<VersionChangeEvent>
read-only
on Events Inherited
read-only

Instance Methods

createObjectStore ( String name, {String keyPath, bool autoIncrement} ) → ObjectStore
close ( ) → void
deleteObjectStore ( String name ) → void
transaction ( storeName_OR_storeNames, [String mode] ) → Transaction
transactionList ( List<String> storeNames, [String mode] ) → Transaction
transactionStore ( String storeName, [String mode] ) → Transaction
transactionStores ( List<String> storeNames, [String mode] ) → Transaction
addEventListener Inherited ( String type, dynamic listener(Event event), [bool useCapture] ) → void
removeEventListener Inherited ( String type, dynamic listener(Event event), [bool useCapture] ) → void
dispatchEvent Inherited ( Event event ) → bool