XchainRepository class Null safety
The cross chain repository for XchainModel database persistance.
Constructors
- XchainRepository(Database _db)
-
Builds a XchainRepository that will use
_db
for persistence.
Properties
- 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
Methods
-
createTable(
) → void - Creates the XchainRepository.table if it does not exist.
-
get(
Uint8List address) → XchainModel? - Gets a xchain by its address.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
save(
XchainModel xchain) → void -
Persists
xchain
in_db
. -
toString(
) → String -
A string representation of this object.
inherited
-
update(
Uint8List address, Uint8List lastBlock) → void - Updates the persisted XchainModel.lastBlock.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- columnAddress → const String
-
The base64Url representation of the chain address.
'address'
- columnLastBlock → const String
-
The bae64Url representation of the BlockModel.id for the last validated block.
'last_block'
- columnPublicKey → const String
-
The chain public key.
'public_key'
- table → const String
-
The XchainModel table name in
_db
.'xchain'