utils/idb_import_export
library
Classes
-
Database
-
provides a connection to a database; you can use an Database object to
open a transaction on your database then create, manipulate, and delete
objects (data) in that database. The interface provides the only way to get
and manage versions of the database.
-
Event
-
Event abstraction for onBlockedFunction
-
IdbCursor
-
represents a cursor for traversing or iterating over multiple records in a
database.
-
IdbCursorWithValue
-
represents a cursor for traversing or iterating over multiple records in a
database. It is the same as the Cursor, except that it includes the value
property.
-
IdbExportNativeValue
-
Sentinel values returned by an IdbExportNativeValueEncoder.
-
IdbExportNativeValueContext
-
A native value met by an export.
-
IdbExportOptions
-
Options of an idb or sdb export (
idbExportDatabase,
idbExportDatabaseLines, sdbExportDatabaseLines).
-
IdbFactory
-
Out factory for opening a database instead of using window.indexedDB
-
IdbFactorySandbox
-
Sandboxed
-
IdbImportOptions
-
Options of an idb or sdb import (
idbImportDatabase,
sdbImportDatabase).
-
IdbNativeValue
-
A browser object stored as is (structured clone) by the native factory,
such as a
FileSystemFileHandle, a FileSystemDirectoryHandle, a Blob,
a File or a CryptoKey.
-
Index
-
provides asynchronous access to an index in a database. An index is a kind
of object store for looking up records in another object store, called the
referenced object store. You use this interface to retrieve data.
-
KeyRange
-
represents a continuous interval over some data type that is used for keys.
-
ObjectStore
-
represents an object store in a database. Records within an object store are
sorted according to their keys. This sorting enables fast insertion,
look-up, and ordered retrieval.
-
OpenDBRequest
-
provides access to the results of requests to open or delete databases
-
Request
-
provides access to results of asynchronous requests to databases and
database objects using event handler attributes. Each reading and writing
operation on a database is done using a request.
-
Transaction
-
static, asynchronous transaction on a database using event handler
attributes. All reading and writing of data is done within transactions. You
actually use Database to start transactions and Transaction to set the
mode of the transaction (e.g. is it readonly or readwrite), and access an
ObjectStore to make a request. You can also use it to abort transactions.
-
VersionChangeEvent
-
indicates that the version of the database has changed, as the result
of an onupgradeneeded event handler function.
Functions
-
idbExportDatabase(Database db, {IdbExportNativeValueEncoder? nativeValueEncoder, IdbExportOptions? options})
→ Future<Map<String, Object?>>
-
export a database in a sdb export format
-
idbExportDatabaseLines(Database db, {IdbExportNativeValueEncoder? nativeValueEncoder, IdbExportOptions? options})
→ Future<List<Object>>
-
export a database in a sdb export format
-
idbImportDatabase(Object data, IdbFactory dstFactory, String dstDbName, {IdbImportOptions? options})
→ Future<Database>
-
Copy a database export (lines or map sembast export) to another
-
newIdbFactoryMemory()
→ IdbFactory
-
An empty in-memory factory, good for unit test.
-
sdbExportDatabase(Database db)
→ Future<Map<String, Object?>>
-
Compat
-
sdbImportDatabase(Object data, IdbFactory dstFactory, String dstDbName)
→ Future<Database>
-
Compat