LocalModelAdapter class

A database adapter that stores data on a local terminal.

Use for application development that does not require external storage of values.

For mobile and desktop, data is encrypted and stored in external files, and for the Web, data is encrypted and stored in LocalStorage.

By adding prefix, all paths can be prefixed, enabling operations such as separating data storage locations for each Flavor.

ローカル端末にデータを保存するデータベースアダプター。

外部に値を保存する必要のないアプリ開発に利用します。

モバイルやデスクトップは外部ファイルに暗号化してデータが保存されWebの場合はLocalStorageに暗号化されデータが保存されます。

prefixを追加することですべてのパスにプレフィックスを付与することができ、Flavorごとにデータの保存場所を分けるなどの運用が可能です。

Inheritance
Available Extensions
Annotations

Constructors

LocalModelAdapter({String? prefix})
A database adapter that stores data on a local terminal.
const

Properties

availableListen bool
no setteroverride
database NoSqlDatabase
Designated database.
no setter
hashCode int
The hash code for this object.
no setteroverride
prefix String?
Path prefix.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

deleteDocument(ModelAdapterDocumentQuery query) Future<void>
Delete data from the platform set by the adapter by passing query.
override
deleteOnTransaction(ModelTransactionRef ref, ModelAdapterDocumentQuery query) → void
Describe the data deletion process when performing a transaction.
override
disposeCollection(ModelAdapterCollectionQuery query) → void
The associated collection is discarded by passing query.
override
disposeDocument(ModelAdapterDocumentQuery query) → void
The destruction of related documents is handled by passing query.
override
listenCollection(ModelAdapterCollectionQuery query) Future<List<StreamSubscription>>
Pass query to monitor the collection.
override
listenDocument(ModelAdapterDocumentQuery query) Future<List<StreamSubscription>>
Pass query to monitor the document.
override
loadCollection(ModelAdapterCollectionQuery query) Future<Map<String, DynamicMap>>
Pass query to the platform set by the adapter to retrieve the collection.
override
loadDocument(ModelAdapterDocumentQuery query) Future<DynamicMap>
Pass query to the platform set by the adapter to retrieve the document.
override
loadOnTransaction(ModelTransactionRef ref, ModelAdapterDocumentQuery query) FutureOr<DynamicMap>
Describe the data acquisition process when performing a transaction.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
runTransaction<T>(DocumentBase<T> doc, FutureOr<void> transaction(ModelTransactionRef ref, ModelTransactionDocument<T> doc)) FutureOr<void>
Do the processing to execute the transaction.
override
saveDocument(ModelAdapterDocumentQuery query, DynamicMap value) Future<void>
By passing the query and the value to be stored, the data is stored on the platform set by the adapter.
override
saveOnTransaction(ModelTransactionRef ref, ModelAdapterDocumentQuery query, DynamicMap value) → void
Describes the data storage process when performing a transaction.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override

Static Properties

sharedDatabase NoSqlDatabase
A common database throughout the application.
final