BlockRepository class Null safety
The repository for BlockModel persistance in Database
.
Constructors
- BlockRepository(Database db)
- Builds a BlockRepository that will use db for persistence.
Properties
- db → Database
-
The
Database
used to persist BlockModel.final - 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 - Builds a BlockRepository that will use db for persistence.
-
getById(
Uint8List id) → BlockModel? - Gets a BlockModel by its BlockModel.id.
-
getLast(
) → BlockModel? - Gets the last persisted BlockModel.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
save(
BlockModel block) → void -
Persists a
block
in the local db. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- columnId → const String
-
The BlockModel.id column.
'id'
- columnPreviousHash → const String
-
The BlockModel.previousHash column.
'previous_hash'
- columnTimestamp → const String
-
The BlockModel.timestamp column.
'timestamp'
- columnTransactionRoot → const String
-
The BlockModel.transactionRoot column.
'transaction_root'
- columnVersion → const String
-
The BlockModel.version column.
'version'
- table → const String
-
The BlockModel table name in db.
'block'