KeyValueMetaProvider class

KeyValueMetaProvider class

By default the table name is set to 'kvpmeta'. It is important to notice that if more KeyValueProvider are created with the default table name, both the getAll and truncate method will affects all the records. To avoid this behavior, use the table paramater to give to each provider a different table name.


KeyValueMetaProvider({@required DbProvider dbProvider, String table: 'kvpmeta'})


createTable ↔ String
read / write
dbProvider DbProvider
table → String
hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited


bulkDelete(List<KeyValueMeta> kvps) → Future<void>
bulkDeleteKeys(List<String> keys) → Future<void>
bulkDeleteKeysStartWith(String prefixKeys) → Future<void>
bulkInsert(List<KeyValueMeta> kvps) → Future<void>
bulkUpdate(List<KeyValueMeta> kvps) → Future<void>
bulkUpdateMeta(String meta, String newMeta) → Future<int>
delete(KeyValueMeta kvp) → Future<int>
deleteById(int id) → Future<int>
deleteByKey(String key) → Future<int>
getAll() → Future<List<KeyValueMeta>>
Get all the key/value pairs stored in the table. It is important to notice that if more KeyValueMetaProvider share the same table (by default is set to 'kvpmeta'), this method will get the ones created with other providers. To avoid this behavior, use the table parameter to specify a different table.
getById(int id) → Future<KeyValueMeta>
getByKey(String key) → Future<KeyValueMeta>
getByMeta(String meta) → Future<List<KeyValueMeta>>
getKeyValueMeta(KeyValueMeta kvp) → Future<KeyValueMeta>
init() → Future<bool>
insert(KeyValueMeta kvp) → Future<KeyValueMeta>
insertKeyValueMeta(String key, String value, String meta) → Future<bool>
truncate() → Future<int>
To delete all the records in the table. It is important to notice that if more provider used the same table (set by defalt to 'kvpmeta') this method will delete even the key/value pairs created with the other providers. To avoid this behavior, initialize the KeyValueMetaProvider giving to the table parameter a different value for each provider.
update(KeyValueMeta kvp, String value) → Future<int>
updateById(int id, String value) → Future<int>
updateByKey(String key, String value) → Future<int>
updateMeta(String key, String newMeta) → Future<int>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
toString() → String
Returns a string representation of this object.


operator ==(dynamic other) → bool
The equality operator.