LocalDataRepository<T extends Entity<EntityKey> > class
You can use Data without Entity
- Inheritance
-
- Object
- DataRepository<
T> - LocalDataRepository
Constructors
-
LocalDataRepository({String? id, required LocalDataSource<
T> source, RemoteDataSource<T> ? backup, FutureConnectivityCallback? connectivity, bool lazyMode = true, bool backupMode = true, bool restoreMode = true, bool singletonMode = false}) -
Constructor for creating a RemoteDataRepository implement.
const
Properties
- backupMode → bool
-
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String?
-
finalinherited
-
isConnected
→ Future<
bool> -
Getter for checking if the device is connected to the internet.
no setterinherited
-
isDisconnected
→ Future<
bool> -
Getter for checking if the device is disconnected from the internet.
no setterinherited
- isLocalDB → bool
-
no setterinherited
- lazyMode → bool
-
finalinherited
-
optional
→ DataSource<
T> ? -
An optional local data source used as a backup or cache when in cache mode.
finalinherited
-
primary
→ DataSource<
T> -
The primary remote data source responsible for fetching data.
finalinherited
- restoreMode → bool
-
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- singletonMode → bool
-
finalinherited
Methods
-
checkById(
String id, {DataFieldParams? params, bool merge = true, bool? createRefs, bool? countable, bool resolveRefs = false, Ignore? ignore, bool? lazyMode, bool? backupMode}) → Future< Response< T> > -
Method to check data by ID with optional data source builder.
inherited
-
clear(
{DataFieldParams? params, bool? resolveRefs, Ignore? ignore, bool deleteRefs = false, bool counter = false, bool? lazyMode, bool? backupMode}) → Future< Response< T> > -
Method to clear data with optional data source builder.
inherited
-
count(
{DataFieldParams? params, bool? backupMode}) → Future< Response< int> > -
Method to count data with optional data source builder.
inherited
-
create(
T data, {DataFieldParams? params, bool merge = true, bool createRefs = false, bool? lazyMode, bool? backupMode}) → Future< Response< T> > -
Method to create data with optional data source builder.
inherited
-
createById(
String id, Map< String, dynamic> data, {DataFieldParams? params, bool merge = true, bool createRefs = false, bool? lazyMode, bool? backupMode}) → Future<Response< T> > -
Method to create data with optional data source builder.
inherited
-
createByWriters(
Iterable< DataWriter> writers, {DataFieldParams? params, bool merge = true, bool createRefs = false, bool? lazyMode, bool? backupMode}) → Future<Response< T> > -
Method to create multiple data entries with optional data source builder.
inherited
-
creates(
Iterable< T> data, {DataFieldParams? params, bool merge = true, bool createRefs = false, bool? lazyMode, bool? backupMode}) → Future<Response< T> > -
Method to create multiple data entries with optional data source builder.
inherited
-
deleteById(
String id, {DataFieldParams? params, bool? resolveRefs, Ignore? ignore, bool counter = false, bool deleteRefs = false, bool? lazyMode, bool? backupMode}) → Future< Response< T> > -
Method to delete data by ID with optional data source builder.
inherited
-
deleteByIds(
Iterable< String> ids, {DataFieldParams? params, bool? resolveRefs, Ignore? ignore, bool counter = false, bool deleteRefs = false, bool? lazyMode, bool? backupMode}) → Future<Response< T> > -
Method to delete data by multiple IDs with optional data source builder.
inherited
-
get(
{DataFieldParams? params, bool? countable, bool onlyUpdates = false, bool resolveRefs = false, bool resolveDocChangesRefs = false, Ignore? ignore, bool? createRefs, bool merge = true, bool? lazyMode, bool? backupMode, bool? singletonMode}) → Future< Response< T> > -
Method to get data with optional data source builder.
inherited
-
getById(
String id, {DataFieldParams? params, bool? countable, bool resolveRefs = false, Ignore? ignore, bool? createRefs, bool merge = true, bool? lazyMode, bool? singletonMode, bool? backupMode}) → Future< Response< T> > -
Method to get data by ID with optional data source builder.
inherited
-
getByIds(
Iterable< String> ids, {DataFieldParams? params, bool? countable, bool resolveRefs = false, bool resolveDocChangesRefs = false, Ignore? ignore, bool? createRefs, bool merge = true, bool? lazyMode, bool? backupMode, bool? singletonMode}) → Future<Response< T> > -
Method to get data by multiple IDs with optional data source builder.
inherited
-
getByQuery(
{DataFieldParams? params, Iterable< DataQuery> queries = const [], Iterable<DataSelection> selections = const [], Iterable<DataSorting> sorts = const [], DataFetchOptions options = const DataFetchOptions(), bool? countable, bool onlyUpdates = false, bool resolveRefs = false, bool resolveDocChangesRefs = false, Ignore? ignore, bool? createRefs, bool merge = true, bool? lazyMode, bool? backupMode, bool? singletonMode}) → Future<Response< T> > -
Method to get data by query with optional data source builder.
inherited
-
isBackupMode(
[bool? backupMode]) → bool -
inherited
-
isLazyMode(
[bool? lazyMode]) → bool -
inherited
-
isSingletonMode(
[bool? singletonMode]) → bool -
inherited
-
listen(
{DataFieldParams? params, bool? countable, bool onlyUpdates = false, bool resolveRefs = false, bool resolveDocChangesRefs = false, Ignore? ignore}) → Stream< Response< T> > -
Stream method to listen for data changes with optional data source builder.
inherited
-
listenById(
String id, {DataFieldParams? params, bool? countable, bool resolveRefs = false, Ignore? ignore}) → Stream< Response< T> > -
Stream method to listen for data changes by ID with optional data source builder.
inherited
-
listenByIds(
Iterable< String> ids, {DataFieldParams? params, bool? countable, bool resolveRefs = false, bool resolveDocChangesRefs = false, Ignore? ignore}) → Stream<Response< T> > -
Stream method to listen for data changes by multiple IDs with optional data source builder.
inherited
-
listenByQuery(
{DataFieldParams? params, Iterable< DataQuery> queries = const [], Iterable<DataSelection> selections = const [], Iterable<DataSorting> sorts = const [], DataFetchOptions options = const DataFetchOptions(), bool? countable, bool onlyUpdates = false, bool resolveRefs = false, bool resolveDocChangesRefs = false, Ignore? ignore}) → Stream<Response< T> > -
Stream method to listen for data changes by query with optional data source builder.
inherited
-
listenCount(
{DataFieldParams? params, Duration? interval}) → Stream< Response< int> > -
Method to listenCount data with optional data source builder.
inherited
-
modifier(
Response< T> value, DataModifiers modifier) → Future<Response< T> > -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
restore(
{DataFieldParams? params, bool onlyUpdates = false, bool? countable, bool? resolveRefs, bool resolveDocChangesRefs = false, Ignore? ignore, bool createRefs = false, bool merge = true, bool? lazyMode}) → Future< void> -
Method to push offline data as online data and pull online data as offline data
inherited
-
search(
Checker checker, {DataFieldParams? params, bool? countable, bool resolveRefs = false, bool resolveDocChangesRefs = false, Ignore? ignore, bool? createRefs, bool merge = true, bool? lazyMode, bool? backupMode}) → Future< Response< T> > -
Method to check data by query with optional data source builder.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
updateById(
String id, Map< String, dynamic> data, {DataFieldParams? params, bool? resolveRefs, Ignore? ignore, bool updateRefs = false, bool? lazyMode, bool? backupMode}) → Future<Response< T> > -
Method to update data by ID with optional data source builder.
inherited
-
updateByIds(
Iterable< DataWriter> updates, {DataFieldParams? params, bool? resolveRefs, Ignore? ignore, bool updateRefs = false, bool? lazyMode, bool? backupMode}) → Future<Response< T> > -
Method to update data by multiple IDs with optional data source builder.
inherited
-
write(
List< DataBatchWriter> writers) → Future<Response< void> > -
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited