Documentation
¶
Index ¶
- Variables
- func AddBlockHook(hookPoint boil.HookPoint, blockHook BlockHook)
- func AddUtxoHook(hookPoint boil.HookPoint, utxoHook UtxoHook)
- func BlockExists(ctx context.Context, exec boil.ContextExecutor, iD int64) (bool, error)
- func Blocks(mods ...qm.QueryMod) blockQuery
- func NewQuery(mods ...qm.QueryMod) *queries.Query
- func UtxoExists(ctx context.Context, exec boil.ContextExecutor, iD int64) (bool, error)
- func Utxos(mods ...qm.QueryMod) utxoQuery
- type Block
- func (o *Block) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Block) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Block) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Block) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- type BlockHook
- type BlockSlice
- type M
- type Utxo
- func (o *Utxo) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Utxo) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Utxo) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Utxo) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- type UtxoHook
- type UtxoSlice
Constants ¶
This section is empty.
Variables ¶
var BlockColumns = struct { ID string Height string Bytes string }{ ID: "id", Height: "height", Bytes: "bytes", }
var BlockRels = struct {
}{}
BlockRels is where relationship names are stored.
var BlockWhere = struct { ID whereHelperint64 Height whereHelperint64 Bytes whereHelperstring }{ ID: whereHelperint64{/* contains filtered or unexported fields */}, Height: whereHelperint64{/* contains filtered or unexported fields */}, Bytes: whereHelperstring{/* contains filtered or unexported fields */}, }
var ErrSyncFail = errors.New("models: failed to synchronize data after insert")
ErrSyncFail occurs during insert when the record could not be retrieved in order to populate default value information. This usually happens when LastInsertId fails or there was a primary key configuration that was not resolvable.
var TableNames = struct { Blocks string Utxo string }{ Blocks: "blocks", Utxo: "utxo", }
var UtxoColumns = struct { ID string Txid string Idx string Amount string ScriptPubkey string }{ ID: "id", Txid: "txid", Idx: "idx", Amount: "amount", ScriptPubkey: "script_pubkey", }
var UtxoRels = struct {
}{}
UtxoRels is where relationship names are stored.
var UtxoWhere = struct { ID whereHelperint64 Txid whereHelperstring Idx whereHelperint64 Amount whereHelperint64 ScriptPubkey whereHelperstring }{ ID: whereHelperint64{/* contains filtered or unexported fields */}, Txid: whereHelperstring{/* contains filtered or unexported fields */}, Idx: whereHelperint64{/* contains filtered or unexported fields */}, Amount: whereHelperint64{/* contains filtered or unexported fields */}, ScriptPubkey: whereHelperstring{/* contains filtered or unexported fields */}, }
Functions ¶
func AddBlockHook ¶
AddBlockHook registers your hook function for all future operations.
func AddUtxoHook ¶
AddUtxoHook registers your hook function for all future operations.
func BlockExists ¶
BlockExists checks if the Block row exists.
func UtxoExists ¶
UtxoExists checks if the Utxo row exists.
Types ¶
type Block ¶
type Block struct { ID int64 `boil:"id" json:"id" toml:"id" yaml:"id"` Height int64 `boil:"height" json:"height" toml:"height" yaml:"height"` Bytes string `boil:"bytes" json:"bytes" toml:"bytes" yaml:"bytes"` R *blockR `boil:"-" json:"-" toml:"-" yaml:"-"` L blockL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Block is an object representing the database table.
func FindBlock ¶
func FindBlock(ctx context.Context, exec boil.ContextExecutor, iD int64, selectCols ...string) (*Block, error)
FindBlock retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Block) Delete ¶
Delete deletes a single Block record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Block) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Block) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Block) Update ¶
func (o *Block) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Block. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.
type BlockSlice ¶
type BlockSlice []*Block
BlockSlice is an alias for a slice of pointers to Block. This should generally be used opposed to []Block.
func (BlockSlice) DeleteAll ¶
func (o BlockSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*BlockSlice) ReloadAll ¶
func (o *BlockSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error
ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.
func (BlockSlice) UpdateAll ¶
func (o BlockSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type M ¶
type M map[string]interface{}
M type is for providing columns and column values to UpdateAll.
type Utxo ¶
type Utxo struct { ID int64 `boil:"id" json:"id" toml:"id" yaml:"id"` Txid string `boil:"txid" json:"txid" toml:"txid" yaml:"txid"` Idx int64 `boil:"idx" json:"idx" toml:"idx" yaml:"idx"` Amount int64 `boil:"amount" json:"amount" toml:"amount" yaml:"amount"` ScriptPubkey string `boil:"script_pubkey" json:"script_pubkey" toml:"script_pubkey" yaml:"script_pubkey"` R *utxoR `boil:"-" json:"-" toml:"-" yaml:"-"` L utxoL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Utxo is an object representing the database table.
func FindUtxo ¶
func FindUtxo(ctx context.Context, exec boil.ContextExecutor, iD int64, selectCols ...string) (*Utxo, error)
FindUtxo retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Utxo) Delete ¶
Delete deletes a single Utxo record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Utxo) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Utxo) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Utxo) Update ¶
func (o *Utxo) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Utxo. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.
type UtxoSlice ¶
type UtxoSlice []*Utxo
UtxoSlice is an alias for a slice of pointers to Utxo. This should generally be used opposed to []Utxo.