models

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: Apache-2.0 Imports: 18 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 MetaTransactionRequestColumns = struct {
	ID                   string
	Nonce                string
	GasPrice             string
	To                   string
	Data                 string
	Hash                 string
	SubmittedBlockNumber string
	SubmittedBlockHash   string
	MinedBlockNumber     string
	MinedBlockHash       string
	CreatedAt            string
	UpdatedAt            string
	BoostedBlockNumber   string
	BoostedBlockHash     string
	WalletIndex          string
}{
	ID:                   "id",
	Nonce:                "nonce",
	GasPrice:             "gas_price",
	To:                   "to",
	Data:                 "data",
	Hash:                 "hash",
	SubmittedBlockNumber: "submitted_block_number",
	SubmittedBlockHash:   "submitted_block_hash",
	MinedBlockNumber:     "mined_block_number",
	MinedBlockHash:       "mined_block_hash",
	CreatedAt:            "created_at",
	UpdatedAt:            "updated_at",
	BoostedBlockNumber:   "boosted_block_number",
	BoostedBlockHash:     "boosted_block_hash",
	WalletIndex:          "wallet_index",
}
View Source
var MetaTransactionRequestRels = struct {
}{}

MetaTransactionRequestRels is where relationship names are stored.

View Source
var MetaTransactionRequestTableColumns = struct {
	ID                   string
	Nonce                string
	GasPrice             string
	To                   string
	Data                 string
	Hash                 string
	SubmittedBlockNumber string
	SubmittedBlockHash   string
	MinedBlockNumber     string
	MinedBlockHash       string
	CreatedAt            string
	UpdatedAt            string
	BoostedBlockNumber   string
	BoostedBlockHash     string
	WalletIndex          string
}{
	ID:                   "meta_transaction_requests.id",
	Nonce:                "meta_transaction_requests.nonce",
	GasPrice:             "meta_transaction_requests.gas_price",
	To:                   "meta_transaction_requests.to",
	Data:                 "meta_transaction_requests.data",
	Hash:                 "meta_transaction_requests.hash",
	SubmittedBlockNumber: "meta_transaction_requests.submitted_block_number",
	SubmittedBlockHash:   "meta_transaction_requests.submitted_block_hash",
	MinedBlockNumber:     "meta_transaction_requests.mined_block_number",
	MinedBlockHash:       "meta_transaction_requests.mined_block_hash",
	CreatedAt:            "meta_transaction_requests.created_at",
	UpdatedAt:            "meta_transaction_requests.updated_at",
	BoostedBlockNumber:   "meta_transaction_requests.boosted_block_number",
	BoostedBlockHash:     "meta_transaction_requests.boosted_block_hash",
	WalletIndex:          "meta_transaction_requests.wallet_index",
}
View Source
var MetaTransactionRequestWhere = struct {
	ID                   whereHelperstring
	Nonce                whereHelpertypes_NullDecimal
	GasPrice             whereHelpertypes_NullDecimal
	To                   whereHelper__byte
	Data                 whereHelper__byte
	Hash                 whereHelpernull_Bytes
	SubmittedBlockNumber whereHelpertypes_NullDecimal
	SubmittedBlockHash   whereHelpernull_Bytes
	MinedBlockNumber     whereHelpertypes_NullDecimal
	MinedBlockHash       whereHelpernull_Bytes
	CreatedAt            whereHelpertime_Time
	UpdatedAt            whereHelpertime_Time
	BoostedBlockNumber   whereHelpertypes_NullDecimal
	BoostedBlockHash     whereHelpernull_Bytes
	WalletIndex          whereHelperint
}{
	ID:                   whereHelperstring{/* contains filtered or unexported fields */},
	Nonce:                whereHelpertypes_NullDecimal{/* contains filtered or unexported fields */},
	GasPrice:             whereHelpertypes_NullDecimal{/* contains filtered or unexported fields */},
	To:                   whereHelper__byte{/* contains filtered or unexported fields */},
	Data:                 whereHelper__byte{/* contains filtered or unexported fields */},
	Hash:                 whereHelpernull_Bytes{/* contains filtered or unexported fields */},
	SubmittedBlockNumber: whereHelpertypes_NullDecimal{/* contains filtered or unexported fields */},
	SubmittedBlockHash:   whereHelpernull_Bytes{/* contains filtered or unexported fields */},
	MinedBlockNumber:     whereHelpertypes_NullDecimal{/* contains filtered or unexported fields */},
	MinedBlockHash:       whereHelpernull_Bytes{/* contains filtered or unexported fields */},
	CreatedAt:            whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt:            whereHelpertime_Time{/* contains filtered or unexported fields */},
	BoostedBlockNumber:   whereHelpertypes_NullDecimal{/* contains filtered or unexported fields */},
	BoostedBlockHash:     whereHelpernull_Bytes{/* contains filtered or unexported fields */},
	WalletIndex:          whereHelperint{/* contains filtered or unexported fields */},
}
View Source
var TableNames = struct {
	MetaTransactionRequests string
}{
	MetaTransactionRequests: "meta_transaction_requests",
}
View Source
var ViewNames = struct {
}{}

Functions

func AddMetaTransactionRequestHook

func AddMetaTransactionRequestHook(hookPoint boil.HookPoint, metaTransactionRequestHook MetaTransactionRequestHook)

AddMetaTransactionRequestHook registers your hook function for all future operations.

func MetaTransactionRequestExists

func MetaTransactionRequestExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)

MetaTransactionRequestExists checks if the MetaTransactionRequest row exists.

func MetaTransactionRequests

func MetaTransactionRequests(mods ...qm.QueryMod) metaTransactionRequestQuery

MetaTransactionRequests 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 M

type M map[string]interface{}

M type is for providing columns and column values to UpdateAll.

type MetaTransactionRequest

type MetaTransactionRequest struct {
	ID                   string            `boil:"id" json:"id" toml:"id" yaml:"id"`
	Nonce                types.NullDecimal `boil:"nonce" json:"nonce,omitempty" toml:"nonce" yaml:"nonce,omitempty"`
	GasPrice             types.NullDecimal `boil:"gas_price" json:"gas_price,omitempty" toml:"gas_price" yaml:"gas_price,omitempty"`
	To                   []byte            `boil:"to" json:"to" toml:"to" yaml:"to"`
	Data                 []byte            `boil:"data" json:"data" toml:"data" yaml:"data"`
	Hash                 null.Bytes        `boil:"hash" json:"hash,omitempty" toml:"hash" yaml:"hash,omitempty"`
	SubmittedBlockNumber types.NullDecimal `` /* 139-byte string literal not displayed */
	SubmittedBlockHash   null.Bytes        `` /* 131-byte string literal not displayed */
	MinedBlockNumber     types.NullDecimal `boil:"mined_block_number" json:"mined_block_number,omitempty" toml:"mined_block_number" yaml:"mined_block_number,omitempty"`
	MinedBlockHash       null.Bytes        `boil:"mined_block_hash" json:"mined_block_hash,omitempty" toml:"mined_block_hash" yaml:"mined_block_hash,omitempty"`
	CreatedAt            time.Time         `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	UpdatedAt            time.Time         `boil:"updated_at" json:"updated_at" toml:"updated_at" yaml:"updated_at"`
	BoostedBlockNumber   types.NullDecimal `` /* 131-byte string literal not displayed */
	BoostedBlockHash     null.Bytes        `boil:"boosted_block_hash" json:"boosted_block_hash,omitempty" toml:"boosted_block_hash" yaml:"boosted_block_hash,omitempty"`
	WalletIndex          int               `boil:"wallet_index" json:"wallet_index" toml:"wallet_index" yaml:"wallet_index"`

	R *metaTransactionRequestR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L metaTransactionRequestL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

MetaTransactionRequest is an object representing the database table.

func FindMetaTransactionRequest

func FindMetaTransactionRequest(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*MetaTransactionRequest, error)

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

func (*MetaTransactionRequest) Delete

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

func (*MetaTransactionRequest) Exists

Exists checks if the MetaTransactionRequest row exists.

func (*MetaTransactionRequest) Insert

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

func (*MetaTransactionRequest) Reload

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

func (*MetaTransactionRequest) Update

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

func (*MetaTransactionRequest) Upsert

func (o *MetaTransactionRequest) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns, opts ...UpsertOptionFunc) error

Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.

type MetaTransactionRequestHook

type MetaTransactionRequestHook func(context.Context, boil.ContextExecutor, *MetaTransactionRequest) error

MetaTransactionRequestHook is the signature for custom MetaTransactionRequest hook methods

type MetaTransactionRequestSlice

type MetaTransactionRequestSlice []*MetaTransactionRequest

MetaTransactionRequestSlice is an alias for a slice of pointers to MetaTransactionRequest. This should almost always be used instead of []MetaTransactionRequest.

func (MetaTransactionRequestSlice) DeleteAll

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

func (*MetaTransactionRequestSlice) ReloadAll

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

func (MetaTransactionRequestSlice) UpdateAll

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

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

type UpsertOptionFunc added in v0.4.0

type UpsertOptionFunc func(o *UpsertOptions)

func UpsertConflictTarget added in v0.4.0

func UpsertConflictTarget(conflictTarget string) UpsertOptionFunc

func UpsertUpdateSet added in v0.4.0

func UpsertUpdateSet(updateSet string) UpsertOptionFunc

type UpsertOptions added in v0.4.0

type UpsertOptions struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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