Session class

An opened Session instance.

This class represents an active session, including its handle and isTransaction status.

Constructors

Session({SessionHandle? handle, required bool isTransaction})
Constructs an instance of Session.

Properties

handle SessionHandle?
The handle for the session.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isTransaction bool
Determines if the session is a transaction.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() Future<void>
Closes the session without specifying the commit behaviour.
commit() Future<void>
Commits the current transaction and closes the session.
count({required String category, Map<String, dynamic>? tagFilter}) Future<int>
Counts the records matching a category and tag filter.
fetch({required String category, required String name, bool forUpdate = false, bool isJson = false}) Future<EntryObject?>
Fetches a record from the store by category and name.
fetchAll({required String category, bool forUpdate = false, int? limit, Map<String, dynamic>? tagFilter, bool isJson = false, String? orderBy, bool? descending}) Future<List<EntryObject>>
Fetches all records matching a category and tag filter.
fetchAllKeys({bool forUpdate = false, KeyAlgorithm? algorithm, int? limit, Map<String, dynamic>? tagFilter, String? thumbprint}) Future<List<KeyEntryObject>>
Fetches a set of keys in the store.
fetchKey({required String name, bool forUpdate = false}) Future<KeyEntryObject?>
Fetches a key in the store by name.
insert({required String category, required String name, required String value, Map<String, dynamic>? tags, int? expiryMs}) Future<void>
Inserts a new record into the store.
insertKey({required String name, required Key key, String? metadata, Map<String, dynamic>? tags, int? expiryMs}) Future<void>
Inserts a new key into the store.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove({required String category, required String name}) Future<void>
Removes a record by category and name.
removeAll({required String category, Map<String, dynamic>? tagFilter}) Future<void>
Removes all records matching a category and tag filter.
removeKey({required String name}) Future<void>
Removes a key from the store.
replace({required String category, required String name, required String value, Map<String, dynamic>? tags, int? expiryMs}) Future<void>
Replaces a record in the store matching a category and name.
rollback() Future<void>
Rolls back the current transaction and closes the session.
toString() String
A string representation of this object.
inherited
updateKey({required String name, String? metadata, Map<String, dynamic>? tags, int? expiryMs}) Future<void>
Updates details of a key in the store.

Operators

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