Documentation ¶
Index ¶
- Variables
- func AddLastSyncHook(hookPoint boil.HookPoint, lastSyncHook LastSyncHook)
- func AddSchemaMigrationHook(hookPoint boil.HookPoint, schemaMigrationHook SchemaMigrationHook)
- func LastSyncExists(ctx context.Context, exec boil.ContextExecutor, baseAsset string, ...) (bool, error)
- func LastSyncs(mods ...qm.QueryMod) lastSyncQuery
- func NewQuery(mods ...qm.QueryMod) *queries.Query
- func SchemaMigrationExists(ctx context.Context, exec boil.ContextExecutor, version int64) (bool, error)
- func SchemaMigrations(mods ...qm.QueryMod) schemaMigrationQuery
- type LastSync
- func (o *LastSync) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *LastSync) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *LastSync) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *LastSync) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *LastSync) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type LastSyncHook
- type LastSyncSlice
- type M
- type SchemaMigration
- func (o *SchemaMigration) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *SchemaMigration) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *SchemaMigration) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *SchemaMigration) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *SchemaMigration) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type SchemaMigrationHook
- type SchemaMigrationSlice
- func (o SchemaMigrationSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *SchemaMigrationSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error
- func (o SchemaMigrationSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
Constants ¶
This section is empty.
Variables ¶
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 LastSyncColumns = struct { BaseAsset string QuoteAsset string Exchange string LastSync string }{ BaseAsset: "base_asset", QuoteAsset: "quote_asset", Exchange: "exchange", LastSync: "last_sync", }
var LastSyncRels = struct {
}{}
LastSyncRels is where relationship names are stored.
var LastSyncWhere = struct { BaseAsset whereHelperstring QuoteAsset whereHelperstring Exchange whereHelperstring LastSync whereHelpernull_Time }{ BaseAsset: whereHelperstring{/* contains filtered or unexported fields */}, QuoteAsset: whereHelperstring{/* contains filtered or unexported fields */}, Exchange: whereHelperstring{/* contains filtered or unexported fields */}, LastSync: whereHelpernull_Time{/* contains filtered or unexported fields */}, }
var SchemaMigrationColumns = struct { Version string Dirty string }{ Version: "version", Dirty: "dirty", }
var SchemaMigrationRels = struct {
}{}
SchemaMigrationRels is where relationship names are stored.
var SchemaMigrationWhere = struct { Version whereHelperint64 Dirty whereHelperbool }{ Version: whereHelperint64{/* contains filtered or unexported fields */}, Dirty: whereHelperbool{/* contains filtered or unexported fields */}, }
var TableNames = struct { LastSync string SchemaMigrations string }{ LastSync: "last_sync", SchemaMigrations: "schema_migrations", }
Functions ¶
func AddLastSyncHook ¶
func AddLastSyncHook(hookPoint boil.HookPoint, lastSyncHook LastSyncHook)
AddLastSyncHook registers your hook function for all future operations.
func AddSchemaMigrationHook ¶
func AddSchemaMigrationHook(hookPoint boil.HookPoint, schemaMigrationHook SchemaMigrationHook)
AddSchemaMigrationHook registers your hook function for all future operations.
func LastSyncExists ¶
func LastSyncExists(ctx context.Context, exec boil.ContextExecutor, baseAsset string, quoteAsset string, exchange string) (bool, error)
LastSyncExists checks if the LastSync row exists.
func SchemaMigrationExists ¶
func SchemaMigrationExists(ctx context.Context, exec boil.ContextExecutor, version int64) (bool, error)
SchemaMigrationExists checks if the SchemaMigration row exists.
func SchemaMigrations ¶
SchemaMigrations retrieves all the records using an executor.
Types ¶
type LastSync ¶
type LastSync struct { BaseAsset string `boil:"base_asset" json:"base_asset" toml:"base_asset" yaml:"base_asset"` QuoteAsset string `boil:"quote_asset" json:"quote_asset" toml:"quote_asset" yaml:"quote_asset"` Exchange string `boil:"exchange" json:"exchange" toml:"exchange" yaml:"exchange"` LastSync null.Time `boil:"last_sync" json:"last_sync,omitempty" toml:"last_sync" yaml:"last_sync,omitempty"` R *lastSyncR `boil:"-" json:"-" toml:"-" yaml:"-"` L lastSyncL `boil:"-" json:"-" toml:"-" yaml:"-"` }
LastSync is an object representing the database table.
func FindLastSync ¶
func FindLastSync(ctx context.Context, exec boil.ContextExecutor, baseAsset string, quoteAsset string, exchange string, selectCols ...string) (*LastSync, error)
FindLastSync retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*LastSync) Delete ¶
Delete deletes a single LastSync record with an executor. Delete will match against the primary key column to find the record to delete.
func (*LastSync) Insert ¶
func (o *LastSync) 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 (*LastSync) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*LastSync) Update ¶
func (o *LastSync) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the LastSync. 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 (*LastSync) Upsert ¶
func (o *LastSync) Upsert(ctx context.Context, exec boil.ContextExecutor, 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 LastSyncHook ¶
LastSyncHook is the signature for custom LastSync hook methods
type LastSyncSlice ¶
type LastSyncSlice []*LastSync
LastSyncSlice is an alias for a slice of pointers to LastSync. This should generally be used opposed to []LastSyncTime.
func (LastSyncSlice) DeleteAll ¶
func (o LastSyncSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*LastSyncSlice) ReloadAll ¶
func (o *LastSyncSlice) 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 (LastSyncSlice) UpdateAll ¶
func (o LastSyncSlice) 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 SchemaMigration ¶
type SchemaMigration struct { Version int64 `boil:"version" json:"version" toml:"version" yaml:"version"` Dirty bool `boil:"dirty" json:"dirty" toml:"dirty" yaml:"dirty"` R *schemaMigrationR `boil:"-" json:"-" toml:"-" yaml:"-"` L schemaMigrationL `boil:"-" json:"-" toml:"-" yaml:"-"` }
SchemaMigration is an object representing the database table.
func FindSchemaMigration ¶
func FindSchemaMigration(ctx context.Context, exec boil.ContextExecutor, version int64, selectCols ...string) (*SchemaMigration, error)
FindSchemaMigration retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*SchemaMigration) Delete ¶
func (o *SchemaMigration) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
Delete deletes a single SchemaMigration record with an executor. Delete will match against the primary key column to find the record to delete.
func (*SchemaMigration) Insert ¶
func (o *SchemaMigration) 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 (*SchemaMigration) Reload ¶
func (o *SchemaMigration) Reload(ctx context.Context, exec boil.ContextExecutor) error
Reload refetches the object from the database using the primary keys with an executor.
func (*SchemaMigration) Update ¶
func (o *SchemaMigration) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the SchemaMigration. 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 (*SchemaMigration) Upsert ¶
func (o *SchemaMigration) Upsert(ctx context.Context, exec boil.ContextExecutor, 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 SchemaMigrationHook ¶
type SchemaMigrationHook func(context.Context, boil.ContextExecutor, *SchemaMigration) error
SchemaMigrationHook is the signature for custom SchemaMigration hook methods
type SchemaMigrationSlice ¶
type SchemaMigrationSlice []*SchemaMigration
SchemaMigrationSlice is an alias for a slice of pointers to SchemaMigration. This should generally be used opposed to []SchemaMigration.
func (SchemaMigrationSlice) DeleteAll ¶
func (o SchemaMigrationSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*SchemaMigrationSlice) ReloadAll ¶
func (o *SchemaMigrationSlice) 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 (SchemaMigrationSlice) UpdateAll ¶
func (o SchemaMigrationSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.