models

package
v0.0.0-...-9742f5a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 29, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
var EscrowColumns = struct {
	Txid           string
	InnerMasterKey string
	OuterMasterKey string
	Slots          string
	PublisherAddr  string
}{
	Txid:           "txid",
	InnerMasterKey: "inner_master_key",
	OuterMasterKey: "outer_master_key",
	Slots:          "slots",
	PublisherAddr:  "publisher_addr",
}
View Source
var EscrowRels = struct {
}{}

EscrowRels is where relationship names are stored.

View Source
var EscrowWhere = struct {
	Txid           whereHelpercommon_EscrowID
	InnerMasterKey whereHelper__byte
	OuterMasterKey whereHelper__byte
	Slots          whereHelperuint64
	PublisherAddr  whereHelperstring
}{
	Txid:           whereHelpercommon_EscrowID{/* contains filtered or unexported fields */},
	InnerMasterKey: whereHelper__byte{/* contains filtered or unexported fields */},
	OuterMasterKey: whereHelper__byte{/* contains filtered or unexported fields */},
	Slots:          whereHelperuint64{/* contains filtered or unexported fields */},
	PublisherAddr:  whereHelperstring{/* contains filtered or unexported fields */},
}
View Source
var LogicalCacheMappingColumns = struct {
	Txid          string
	SlotIdx       string
	BlockEscrowID string
	ChunkID       string
}{
	Txid:          "txid",
	SlotIdx:       "slot_idx",
	BlockEscrowID: "block_escrow_id",
	ChunkID:       "chunk_id",
}
View Source
var LogicalCacheMappingRels = struct {
}{}

LogicalCacheMappingRels is where relationship names are stored.

View Source
var LogicalCacheMappingWhere = struct {
	Txid          whereHelpercommon_EscrowID
	SlotIdx       whereHelperuint64
	BlockEscrowID whereHelperstring
	ChunkID       whereHelpercommon_ChunkID
}{
	Txid:          whereHelpercommon_EscrowID{/* contains filtered or unexported fields */},
	SlotIdx:       whereHelperuint64{/* contains filtered or unexported fields */},
	BlockEscrowID: whereHelperstring{/* contains filtered or unexported fields */},
	ChunkID:       whereHelpercommon_ChunkID{/* contains filtered or unexported fields */},
}
View Source
var TableNames = struct {
	Escrow              string
	LogicalCacheMapping string
}{
	Escrow:              "escrow",
	LogicalCacheMapping: "logical_cache_mapping",
}

Functions

func AddEscrowHook

func AddEscrowHook(hookPoint boil.HookPoint, escrowHook EscrowHook)

AddEscrowHook registers your hook function for all future operations.

func AddLogicalCacheMappingHook

func AddLogicalCacheMappingHook(hookPoint boil.HookPoint, logicalCacheMappingHook LogicalCacheMappingHook)

AddLogicalCacheMappingHook registers your hook function for all future operations.

func EscrowExists

func EscrowExists(ctx context.Context, exec boil.ContextExecutor, txid common.EscrowID) (bool, error)

EscrowExists checks if the Escrow row exists.

func Escrows

func Escrows(mods ...qm.QueryMod) escrowQuery

Escrows retrieves all the records using an executor.

func LogicalCacheMappingExists

func LogicalCacheMappingExists(ctx context.Context, exec boil.ContextExecutor, txid common.EscrowID, slotIdx uint64) (bool, error)

LogicalCacheMappingExists checks if the LogicalCacheMapping row exists.

func LogicalCacheMappings

func LogicalCacheMappings(mods ...qm.QueryMod) logicalCacheMappingQuery

LogicalCacheMappings retrieves all the records using an executor.

func NewQuery

func NewQuery(mods ...qm.QueryMod) *queries.Query

NewQuery initializes a new Query using the passed in QueryMods

Types

type Escrow

type Escrow struct {
	Txid           common.EscrowID `boil:"txid" json:"txid" toml:"txid" yaml:"txid"`
	InnerMasterKey []byte          `boil:"inner_master_key" json:"inner_master_key" toml:"inner_master_key" yaml:"inner_master_key"`
	OuterMasterKey []byte          `boil:"outer_master_key" json:"outer_master_key" toml:"outer_master_key" yaml:"outer_master_key"`
	Slots          uint64          `boil:"slots" json:"slots" toml:"slots" yaml:"slots"`
	PublisherAddr  string          `boil:"publisher_addr" json:"publisher_addr" toml:"publisher_addr" yaml:"publisher_addr"`

	R *escrowR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L escrowL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Escrow is an object representing the database table.

func FindEscrow

func FindEscrow(ctx context.Context, exec boil.ContextExecutor, txid common.EscrowID, selectCols ...string) (*Escrow, error)

FindEscrow retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func (*Escrow) Delete

func (o *Escrow) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

Delete deletes a single Escrow record with an executor. Delete will match against the primary key column to find the record to delete.

func (*Escrow) Insert

func (o *Escrow) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*Escrow) Reload

func (o *Escrow) Reload(ctx context.Context, exec boil.ContextExecutor) error

Reload refetches the object from the database using the primary keys with an executor.

func (*Escrow) Update

func (o *Escrow) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the Escrow. 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 EscrowHook

type EscrowHook func(context.Context, boil.ContextExecutor, *Escrow) error

EscrowHook is the signature for custom Escrow hook methods

type EscrowSlice

type EscrowSlice []*Escrow

EscrowSlice is an alias for a slice of pointers to Escrow. This should generally be used opposed to []Escrow.

func (EscrowSlice) DeleteAll

func (o EscrowSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)

DeleteAll deletes all rows in the slice, using an executor.

func (*EscrowSlice) ReloadAll

func (o *EscrowSlice) 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 (EscrowSlice) UpdateAll

func (o EscrowSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

type LogicalCacheMapping

type LogicalCacheMapping struct {
	Txid          common.EscrowID `boil:"txid" json:"txid" toml:"txid" yaml:"txid"`
	SlotIdx       uint64          `boil:"slot_idx" json:"slot_idx" toml:"slot_idx" yaml:"slot_idx"`
	BlockEscrowID string          `boil:"block_escrow_id" json:"block_escrow_id" toml:"block_escrow_id" yaml:"block_escrow_id"`
	ChunkID       common.ChunkID  `boil:"chunk_id" json:"chunk_id" toml:"chunk_id" yaml:"chunk_id"`

	R *logicalCacheMappingR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L logicalCacheMappingL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

LogicalCacheMapping is an object representing the database table.

func FindLogicalCacheMapping

func FindLogicalCacheMapping(ctx context.Context, exec boil.ContextExecutor, txid common.EscrowID, slotIdx uint64, selectCols ...string) (*LogicalCacheMapping, error)

FindLogicalCacheMapping retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func (*LogicalCacheMapping) Delete

Delete deletes a single LogicalCacheMapping record with an executor. Delete will match against the primary key column to find the record to delete.

func (*LogicalCacheMapping) Insert

func (o *LogicalCacheMapping) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*LogicalCacheMapping) Reload

Reload refetches the object from the database using the primary keys with an executor.

func (*LogicalCacheMapping) Update

func (o *LogicalCacheMapping) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the LogicalCacheMapping. 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 LogicalCacheMappingHook

type LogicalCacheMappingHook func(context.Context, boil.ContextExecutor, *LogicalCacheMapping) error

LogicalCacheMappingHook is the signature for custom LogicalCacheMapping hook methods

type LogicalCacheMappingSlice

type LogicalCacheMappingSlice []*LogicalCacheMapping

LogicalCacheMappingSlice is an alias for a slice of pointers to LogicalCacheMapping. This should generally be used opposed to []LogicalCacheMapping.

func (LogicalCacheMappingSlice) DeleteAll

DeleteAll deletes all rows in the slice, using an executor.

func (*LogicalCacheMappingSlice) ReloadAll

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (LogicalCacheMappingSlice) UpdateAll

func (o LogicalCacheMappingSlice) 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL