TransactionRepository class Null safety
The repository for TransactionModel persistence in Database
.
Constructors
- TransactionRepository(Database _db)
-
Builds a TransactionRepository 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
-
commit(
Uint8List id, BlockModel block, Uint8List proof) → void -
Commits the
transaction
by saving its TransactionModel.merkelProof and TransactionModel.block -
getByBlockId(
Uint8List? id) → List< TransactionModel> -
Gets the
List
ofTransactionModel
from the BlockModel from its BlockModel.id. -
getById(
Uint8List id) → TransactionModel? -
Gets a TransactionModel by its
id
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
save(
TransactionModel transaction) → void -
Persists a
transaction
in_db
. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- columnAddress → const String
-
The TransactionModel.address column.
'address'
- columnAssetRef → const String
-
The TransactionModel.assetRef column.
'asset_ref'
- columnBlockId → const String
-
The TransactionModel.block column identified by BlockModel.id.
'block_id'
- columnContents → const String
-
The TransactionModel.contents column.
'contents'
- columnId → const String
-
The TransactionModel.id column.
'id'
- columnMerkelProof → const String
-
The TransactionModel.merkelProof column.
'merkel_proof'
- columnSignature → const String
-
The TransactionModel.signature column.
'signature'
- columnTimestamp → const String
-
The TransactionModel.timestamp column.
'timestamp'
- columnVersion → const String
-
The TransactionModel.version column.
'version'
- table → const String
-
The TransactionModel table name in
_db
.'txn'