Documentation ¶
Index ¶
- Variables
- func AddDividendHook(hookPoint boil.HookPoint, dividendHook DividendHook)
- func AddSnapshotHook(hookPoint boil.HookPoint, snapshotHook SnapshotHook)
- func DividendExists(exec boil.Executor, iD int) (bool, error)
- func Dividends(mods ...qm.QueryMod) dividendQuery
- func NewQuery(mods ...qm.QueryMod) *queries.Query
- func SnapshotExists(exec boil.Executor, iD int) (bool, error)
- func Snapshots(mods ...qm.QueryMod) snapshotQuery
- type Dividend
- func (o *Dividend) Delete(exec boil.Executor) (int64, error)
- func (o *Dividend) Insert(exec boil.Executor, columns boil.Columns) error
- func (o *Dividend) Reload(exec boil.Executor) error
- func (o *Dividend) SetSnapshot(exec boil.Executor, insert bool, related *Snapshot) error
- func (o *Dividend) Snapshot(mods ...qm.QueryMod) snapshotQuery
- func (o *Dividend) Update(exec boil.Executor, columns boil.Columns) (int64, error)
- func (o *Dividend) Upsert(exec boil.Executor, updateOnConflict bool, conflictColumns []string, ...) error
- type DividendHook
- type DividendSlice
- type M
- type Snapshot
- func (o *Snapshot) AddDividends(exec boil.Executor, insert bool, related ...*Dividend) error
- func (o *Snapshot) Delete(exec boil.Executor) (int64, error)
- func (o *Snapshot) Dividends(mods ...qm.QueryMod) dividendQuery
- func (o *Snapshot) Insert(exec boil.Executor, columns boil.Columns) error
- func (o *Snapshot) Reload(exec boil.Executor) error
- func (o *Snapshot) Update(exec boil.Executor, columns boil.Columns) (int64, error)
- func (o *Snapshot) Upsert(exec boil.Executor, updateOnConflict bool, conflictColumns []string, ...) error
- type SnapshotHook
- type SnapshotSlice
Constants ¶
This section is empty.
Variables ¶
var DividendColumns = struct { ID string SnapshotID string AccountID string BalanceLimit string Balance string DividendAmount string }{ ID: "id", SnapshotID: "snapshot_id", AccountID: "account_id", BalanceLimit: "balance_limit", Balance: "balance", DividendAmount: "dividend_amount", }
var DividendRels = struct { Snapshot string }{ Snapshot: "Snapshot", }
DividendRels is where relationship names are stored.
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 SnapshotColumns = struct { ID string AssetCode string Issuer string CreatedAt string UpdatedAt string UpdatedBy string }{ ID: "id", AssetCode: "asset_code", Issuer: "issuer", CreatedAt: "created_at", UpdatedAt: "updated_at", UpdatedBy: "updated_by", }
var SnapshotRels = struct { Dividends string }{ Dividends: "Dividends", }
SnapshotRels is where relationship names are stored.
var TableNames = struct { Dividend string Snapshot string }{ Dividend: "dividend", Snapshot: "snapshot", }
Functions ¶
func AddDividendHook ¶
func AddDividendHook(hookPoint boil.HookPoint, dividendHook DividendHook)
AddDividendHook registers your hook function for all future operations.
func AddSnapshotHook ¶
func AddSnapshotHook(hookPoint boil.HookPoint, snapshotHook SnapshotHook)
AddSnapshotHook registers your hook function for all future operations.
func DividendExists ¶
DividendExists checks if the Dividend row exists.
func SnapshotExists ¶
SnapshotExists checks if the Snapshot row exists.
Types ¶
type Dividend ¶
type Dividend struct { ID int `boil:"id" json:"id" toml:"id" yaml:"id"` SnapshotID int `boil:"snapshot_id" json:"snapshot_id" toml:"snapshot_id" yaml:"snapshot_id"` AccountID string `boil:"account_id" json:"account_id" toml:"account_id" yaml:"account_id"` BalanceLimit int64 `boil:"balance_limit" json:"balance_limit" toml:"balance_limit" yaml:"balance_limit"` Balance int64 `boil:"balance" json:"balance" toml:"balance" yaml:"balance"` DividendAmount null.Int64 `boil:"dividend_amount" json:"dividend_amount,omitempty" toml:"dividend_amount" yaml:"dividend_amount,omitempty"` R *dividendR `boil:"-" json:"-" toml:"-" yaml:"-"` L dividendL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Dividend is an object representing the database table.
func FindDividend ¶
FindDividend retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Dividend) Delete ¶
Delete deletes a single Dividend record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Dividend) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Dividend) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Dividend) SetSnapshot ¶
SetSnapshot of the dividend to the related item. Sets o.R.Snapshot to related. Adds o to related.R.Dividends.
func (*Dividend) Update ¶
Update uses an executor to update the Dividend. 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 (*Dividend) Upsert ¶
func (o *Dividend) Upsert(exec boil.Executor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) 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 DividendHook ¶
DividendHook is the signature for custom Dividend hook methods
type DividendSlice ¶
type DividendSlice []*Dividend
DividendSlice is an alias for a slice of pointers to Dividend. This should generally be used opposed to []Dividend.
func (DividendSlice) DeleteAll ¶
func (o DividendSlice) DeleteAll(exec boil.Executor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
type M ¶
type M map[string]interface{}
M type is for providing columns and column values to UpdateAll.
type Snapshot ¶
type Snapshot struct { ID int `boil:"id" json:"id" toml:"id" yaml:"id"` AssetCode string `boil:"asset_code" json:"asset_code" toml:"asset_code" yaml:"asset_code"` Issuer string `boil:"issuer" json:"issuer" toml:"issuer" yaml:"issuer"` 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"` UpdatedBy string `boil:"updated_by" json:"updated_by" toml:"updated_by" yaml:"updated_by"` R *snapshotR `boil:"-" json:"-" toml:"-" yaml:"-"` L snapshotL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Snapshot is an object representing the database table.
func FindSnapshot ¶
FindSnapshot retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Snapshot) AddDividends ¶
AddDividends adds the given related objects to the existing relationships of the snapshot, optionally inserting them as new records. Appends related to o.R.Dividends. Sets related.R.Snapshot appropriately.
func (*Snapshot) Delete ¶
Delete deletes a single Snapshot record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Snapshot) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Snapshot) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Snapshot) Update ¶
Update uses an executor to update the Snapshot. 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 (*Snapshot) Upsert ¶
func (o *Snapshot) Upsert(exec boil.Executor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) 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 SnapshotHook ¶
SnapshotHook is the signature for custom Snapshot hook methods
type SnapshotSlice ¶
type SnapshotSlice []*Snapshot
SnapshotSlice is an alias for a slice of pointers to Snapshot. This should generally be used opposed to []Snapshot.
func (SnapshotSlice) DeleteAll ¶
func (o SnapshotSlice) DeleteAll(exec boil.Executor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.