Documentation
¶
Index ¶
- Variables
- func AddCreditGrantHook(hookPoint boil.HookPoint, creditGrantHook CreditGrantHook)
- func AddCreditOperationGrantHook(hookPoint boil.HookPoint, creditOperationGrantHook CreditOperationGrantHook)
- func AddCreditOperationHook(hookPoint boil.HookPoint, creditOperationHook CreditOperationHook)
- func CreditGrantExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)
- func CreditGrants(mods ...qm.QueryMod) creditGrantQuery
- func CreditOperationExists(ctx context.Context, exec boil.ContextExecutor, appName string, ...) (bool, error)
- func CreditOperationGrantExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)
- func CreditOperationGrants(mods ...qm.QueryMod) creditOperationGrantQuery
- func CreditOperations(mods ...qm.QueryMod) creditOperationQuery
- func NewQuery(mods ...qm.QueryMod) *queries.Query
- type CreditGrant
- func (o *CreditGrant) AddGrantCreditOperationGrants(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *CreditGrant) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *CreditGrant) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)
- func (o *CreditGrant) GetGrantCreditOperationGrants() CreditOperationGrantSlice
- func (o *CreditGrant) GrantCreditOperationGrants(mods ...qm.QueryMod) creditOperationGrantQuery
- func (o *CreditGrant) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *CreditGrant) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *CreditGrant) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *CreditGrant) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type CreditGrantHook
- type CreditGrantSlice
- type CreditOperation
- func (o *CreditOperation) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *CreditOperation) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)
- func (o *CreditOperation) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *CreditOperation) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *CreditOperation) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *CreditOperation) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type CreditOperationGrant
- func (o *CreditOperationGrant) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *CreditOperationGrant) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)
- func (o *CreditOperationGrant) GetGrant() *CreditGrant
- func (o *CreditOperationGrant) Grant(mods ...qm.QueryMod) creditGrantQuery
- func (o *CreditOperationGrant) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *CreditOperationGrant) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *CreditOperationGrant) SetGrant(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *CreditOperationGrant) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *CreditOperationGrant) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type CreditOperationGrantHook
- type CreditOperationGrantSlice
- func (o CreditOperationGrantSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *CreditOperationGrantSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error
- func (o CreditOperationGrantSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
- type CreditOperationHook
- type CreditOperationSlice
- func (o CreditOperationSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *CreditOperationSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error
- func (o CreditOperationSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
- type M
- type UpsertOptionFunc
- type UpsertOptions
Constants ¶
This section is empty.
Variables ¶
var CreditGrantColumns = struct { ID string TXHash string LogIndex string LicenseID string AssetDid string InitialAmount string RemainingAmount string ExpiresAt string BlockNumber string Status string CreatedAt string UpdatedAt string }{ ID: "id", TXHash: "tx_hash", LogIndex: "log_index", LicenseID: "license_id", AssetDid: "asset_did", InitialAmount: "initial_amount", RemainingAmount: "remaining_amount", ExpiresAt: "expires_at", BlockNumber: "block_number", Status: "status", CreatedAt: "created_at", UpdatedAt: "updated_at", }
var CreditGrantRels = struct { GrantCreditOperationGrants string }{ GrantCreditOperationGrants: "GrantCreditOperationGrants", }
CreditGrantRels is where relationship names are stored.
var CreditGrantTableColumns = struct { ID string TXHash string LogIndex string LicenseID string AssetDid string InitialAmount string RemainingAmount string ExpiresAt string BlockNumber string Status string CreatedAt string UpdatedAt string }{ ID: "credit_grants.id", TXHash: "credit_grants.tx_hash", LogIndex: "credit_grants.log_index", LicenseID: "credit_grants.license_id", AssetDid: "credit_grants.asset_did", InitialAmount: "credit_grants.initial_amount", RemainingAmount: "credit_grants.remaining_amount", ExpiresAt: "credit_grants.expires_at", BlockNumber: "credit_grants.block_number", Status: "credit_grants.status", CreatedAt: "credit_grants.created_at", UpdatedAt: "credit_grants.updated_at", }
var CreditGrantWhere = struct { ID whereHelperstring TXHash whereHelperstring LogIndex whereHelpernull_Int LicenseID whereHelperstring AssetDid whereHelperstring InitialAmount whereHelperint64 RemainingAmount whereHelperint64 ExpiresAt whereHelpertime_Time BlockNumber whereHelpernull_Int64 Status whereHelperstring CreatedAt whereHelpernull_Time UpdatedAt whereHelpernull_Time }{ ID: whereHelperstring{/* contains filtered or unexported fields */}, TXHash: whereHelperstring{/* contains filtered or unexported fields */}, LogIndex: whereHelpernull_Int{/* contains filtered or unexported fields */}, LicenseID: whereHelperstring{/* contains filtered or unexported fields */}, AssetDid: whereHelperstring{/* contains filtered or unexported fields */}, InitialAmount: whereHelperint64{/* contains filtered or unexported fields */}, RemainingAmount: whereHelperint64{/* contains filtered or unexported fields */}, ExpiresAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, BlockNumber: whereHelpernull_Int64{/* contains filtered or unexported fields */}, Status: whereHelperstring{/* contains filtered or unexported fields */}, CreatedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, UpdatedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, }
var CreditOperationColumns = struct { AppName string ReferenceID string OperationType string LicenseID string AssetDid string TotalAmount string CreatedAt string }{ AppName: "app_name", ReferenceID: "reference_id", OperationType: "operation_type", LicenseID: "license_id", AssetDid: "asset_did", TotalAmount: "total_amount", CreatedAt: "created_at", }
var CreditOperationGrantColumns = struct { ID string AppName string ReferenceID string OperationType string GrantID string AmountUsed string CreatedAt string }{ ID: "id", AppName: "app_name", ReferenceID: "reference_id", OperationType: "operation_type", GrantID: "grant_id", AmountUsed: "amount_used", CreatedAt: "created_at", }
var CreditOperationGrantRels = struct { Grant string }{ Grant: "Grant", }
CreditOperationGrantRels is where relationship names are stored.
var CreditOperationGrantTableColumns = struct { ID string AppName string ReferenceID string OperationType string GrantID string AmountUsed string CreatedAt string }{ ID: "credit_operation_grants.id", AppName: "credit_operation_grants.app_name", ReferenceID: "credit_operation_grants.reference_id", OperationType: "credit_operation_grants.operation_type", GrantID: "credit_operation_grants.grant_id", AmountUsed: "credit_operation_grants.amount_used", CreatedAt: "credit_operation_grants.created_at", }
var CreditOperationGrantWhere = struct { ID whereHelperstring AppName whereHelperstring ReferenceID whereHelperstring OperationType whereHelperstring GrantID whereHelperstring AmountUsed whereHelperint64 CreatedAt whereHelpernull_Time }{ ID: whereHelperstring{/* contains filtered or unexported fields */}, AppName: whereHelperstring{/* contains filtered or unexported fields */}, ReferenceID: whereHelperstring{/* contains filtered or unexported fields */}, OperationType: whereHelperstring{/* contains filtered or unexported fields */}, GrantID: whereHelperstring{/* contains filtered or unexported fields */}, AmountUsed: whereHelperint64{/* contains filtered or unexported fields */}, CreatedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, }
var CreditOperationRels = struct {
}{}
CreditOperationRels is where relationship names are stored.
var CreditOperationTableColumns = struct { AppName string ReferenceID string OperationType string LicenseID string AssetDid string TotalAmount string CreatedAt string }{ AppName: "credit_operations.app_name", ReferenceID: "credit_operations.reference_id", OperationType: "credit_operations.operation_type", LicenseID: "credit_operations.license_id", AssetDid: "credit_operations.asset_did", TotalAmount: "credit_operations.total_amount", CreatedAt: "credit_operations.created_at", }
var CreditOperationWhere = struct { AppName whereHelperstring ReferenceID whereHelperstring OperationType whereHelperstring LicenseID whereHelperstring AssetDid whereHelperstring TotalAmount whereHelperint64 CreatedAt whereHelpernull_Time }{ AppName: whereHelperstring{/* contains filtered or unexported fields */}, ReferenceID: whereHelperstring{/* contains filtered or unexported fields */}, OperationType: whereHelperstring{/* contains filtered or unexported fields */}, LicenseID: whereHelperstring{/* contains filtered or unexported fields */}, AssetDid: whereHelperstring{/* contains filtered or unexported fields */}, TotalAmount: whereHelperint64{/* contains filtered or unexported fields */}, CreatedAt: whereHelpernull_Time{/* 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 { CreditGrants string CreditOperationGrants string CreditOperations string }{ CreditGrants: "credit_grants", CreditOperationGrants: "credit_operation_grants", CreditOperations: "credit_operations", }
var ViewNames = struct {
}{}
Functions ¶
func AddCreditGrantHook ¶
func AddCreditGrantHook(hookPoint boil.HookPoint, creditGrantHook CreditGrantHook)
AddCreditGrantHook registers your hook function for all future operations.
func AddCreditOperationGrantHook ¶
func AddCreditOperationGrantHook(hookPoint boil.HookPoint, creditOperationGrantHook CreditOperationGrantHook)
AddCreditOperationGrantHook registers your hook function for all future operations.
func AddCreditOperationHook ¶
func AddCreditOperationHook(hookPoint boil.HookPoint, creditOperationHook CreditOperationHook)
AddCreditOperationHook registers your hook function for all future operations.
func CreditGrantExists ¶
CreditGrantExists checks if the CreditGrant row exists.
func CreditGrants ¶
CreditGrants retrieves all the records using an executor.
func CreditOperationExists ¶
func CreditOperationExists(ctx context.Context, exec boil.ContextExecutor, appName string, referenceID string, operationType string) (bool, error)
CreditOperationExists checks if the CreditOperation row exists.
func CreditOperationGrantExists ¶
func CreditOperationGrantExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)
CreditOperationGrantExists checks if the CreditOperationGrant row exists.
func CreditOperationGrants ¶
CreditOperationGrants retrieves all the records using an executor.
func CreditOperations ¶
CreditOperations retrieves all the records using an executor.
Types ¶
type CreditGrant ¶
type CreditGrant struct {
ID string `boil:"id" json:"id" toml:"id" yaml:"id"`
// Blockchain transaction hash (0x...)
TXHash string `boil:"tx_hash" json:"tx_hash" toml:"tx_hash" yaml:"tx_hash"`
// Event log index within the transaction
LogIndex null.Int `boil:"log_index" json:"log_index,omitempty" toml:"log_index" yaml:"log_index,omitempty"`
// License identifier: Ethereum address or string ID
LicenseID string `boil:"license_id" json:"license_id" toml:"license_id" yaml:"license_id"`
// DID string identifying the physical asset/device
AssetDid string `boil:"asset_did" json:"asset_did" toml:"asset_did" yaml:"asset_did"`
// Original credit amount granted from a burn (never changes)
InitialAmount int64 `boil:"initial_amount" json:"initial_amount" toml:"initial_amount" yaml:"initial_amount"`
// Current unused credits (changes based on usage)
RemainingAmount int64 `boil:"remaining_amount" json:"remaining_amount" toml:"remaining_amount" yaml:"remaining_amount"`
// When these credits become unusable
ExpiresAt time.Time `boil:"expires_at" json:"expires_at" toml:"expires_at" yaml:"expires_at"`
// Blockchain block number (for verification and ordering)
BlockNumber null.Int64 `boil:"block_number" json:"block_number,omitempty" toml:"block_number" yaml:"block_number,omitempty"`
// Transaction state: pending, confirmed, or failed
Status string `boil:"status" json:"status" toml:"status" yaml:"status"`
// When this record was created in our system
CreatedAt null.Time `boil:"created_at" json:"created_at,omitempty" toml:"created_at" yaml:"created_at,omitempty"`
// Last modification (status changes, remaining_amount updates)
UpdatedAt null.Time `boil:"updated_at" json:"updated_at,omitempty" toml:"updated_at" yaml:"updated_at,omitempty"`
R *creditGrantR `boil:"-" json:"-" toml:"-" yaml:"-"`
L creditGrantL `boil:"-" json:"-" toml:"-" yaml:"-"`
}
CreditGrant is an object representing the database table.
func FindCreditGrant ¶
func FindCreditGrant(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*CreditGrant, error)
FindCreditGrant retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*CreditGrant) AddGrantCreditOperationGrants ¶
func (o *CreditGrant) AddGrantCreditOperationGrants(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*CreditOperationGrant) error
AddGrantCreditOperationGrants adds the given related objects to the existing relationships of the credit_grant, optionally inserting them as new records. Appends related to o.R.GrantCreditOperationGrants. Sets related.R.Grant appropriately.
func (*CreditGrant) Delete ¶
func (o *CreditGrant) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
Delete deletes a single CreditGrant record with an executor. Delete will match against the primary key column to find the record to delete.
func (*CreditGrant) Exists ¶
func (o *CreditGrant) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)
Exists checks if the CreditGrant row exists.
func (*CreditGrant) GetGrantCreditOperationGrants ¶
func (o *CreditGrant) GetGrantCreditOperationGrants() CreditOperationGrantSlice
func (*CreditGrant) GrantCreditOperationGrants ¶
func (o *CreditGrant) GrantCreditOperationGrants(mods ...qm.QueryMod) creditOperationGrantQuery
GrantCreditOperationGrants retrieves all the credit_operation_grant's CreditOperationGrants with an executor via grant_id column.
func (*CreditGrant) Insert ¶
func (o *CreditGrant) 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 (*CreditGrant) Reload ¶
func (o *CreditGrant) Reload(ctx context.Context, exec boil.ContextExecutor) error
Reload refetches the object from the database using the primary keys with an executor.
func (*CreditGrant) Update ¶
func (o *CreditGrant) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the CreditGrant. 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 (*CreditGrant) Upsert ¶
func (o *CreditGrant) 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 CreditGrantHook ¶
type CreditGrantHook func(context.Context, boil.ContextExecutor, *CreditGrant) error
CreditGrantHook is the signature for custom CreditGrant hook methods
type CreditGrantSlice ¶
type CreditGrantSlice []*CreditGrant
CreditGrantSlice is an alias for a slice of pointers to CreditGrant. This should almost always be used instead of []CreditGrant.
func (CreditGrantSlice) DeleteAll ¶
func (o CreditGrantSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*CreditGrantSlice) ReloadAll ¶
func (o *CreditGrantSlice) 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 (CreditGrantSlice) UpdateAll ¶
func (o CreditGrantSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type CreditOperation ¶
type CreditOperation struct {
// Which application made the request (e.g., telemetry-api, fetch-api)
AppName string `boil:"app_name" json:"app_name" toml:"app_name" yaml:"app_name"`
// External reference (API request ID, order ID, etc.)
ReferenceID string `boil:"reference_id" json:"reference_id" toml:"reference_id" yaml:"reference_id"`
// Type: deduction (deducts credits), refund (returns credits), grant_purchase (new grant), debt_settlement (settles previous debt)
OperationType string `boil:"operation_type" json:"operation_type" toml:"operation_type" yaml:"operation_type"`
// License that used the credits
LicenseID string `boil:"license_id" json:"license_id" toml:"license_id" yaml:"license_id"`
// Asset that was accessed
AssetDid string `boil:"asset_did" json:"asset_did" toml:"asset_did" yaml:"asset_did"`
// Total credits affected (negative for debit, positive for credit)
TotalAmount int64 `boil:"total_amount" json:"total_amount" toml:"total_amount" yaml:"total_amount"`
// When this operation occurred
CreatedAt null.Time `boil:"created_at" json:"created_at,omitempty" toml:"created_at" yaml:"created_at,omitempty"`
R *creditOperationR `boil:"-" json:"-" toml:"-" yaml:"-"`
L creditOperationL `boil:"-" json:"-" toml:"-" yaml:"-"`
}
CreditOperation is an object representing the database table.
func FindCreditOperation ¶
func FindCreditOperation(ctx context.Context, exec boil.ContextExecutor, appName string, referenceID string, operationType string, selectCols ...string) (*CreditOperation, error)
FindCreditOperation retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*CreditOperation) Delete ¶
func (o *CreditOperation) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
Delete deletes a single CreditOperation record with an executor. Delete will match against the primary key column to find the record to delete.
func (*CreditOperation) Exists ¶
func (o *CreditOperation) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)
Exists checks if the CreditOperation row exists.
func (*CreditOperation) Insert ¶
func (o *CreditOperation) 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 (*CreditOperation) Reload ¶
func (o *CreditOperation) Reload(ctx context.Context, exec boil.ContextExecutor) error
Reload refetches the object from the database using the primary keys with an executor.
func (*CreditOperation) Update ¶
func (o *CreditOperation) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the CreditOperation. 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 (*CreditOperation) Upsert ¶
func (o *CreditOperation) 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 CreditOperationGrant ¶
type CreditOperationGrant struct {
// Unique detail record identifier
ID string `boil:"id" json:"id" toml:"id" yaml:"id"`
// Links to the main operation record
AppName string `boil:"app_name" json:"app_name" toml:"app_name" yaml:"app_name"`
// Links to the main operation record
ReferenceID string `boil:"reference_id" json:"reference_id" toml:"reference_id" yaml:"reference_id"`
// Links to the main operation record
OperationType string `boil:"operation_type" json:"operation_type" toml:"operation_type" yaml:"operation_type"`
// Links to the credit grant
GrantID string `boil:"grant_id" json:"grant_id" toml:"grant_id" yaml:"grant_id"`
// How many credits were taken from this specific grant
AmountUsed int64 `boil:"amount_used" json:"amount_used" toml:"amount_used" yaml:"amount_used"`
// When this grant usage was recorded
CreatedAt null.Time `boil:"created_at" json:"created_at,omitempty" toml:"created_at" yaml:"created_at,omitempty"`
R *creditOperationGrantR `boil:"-" json:"-" toml:"-" yaml:"-"`
L creditOperationGrantL `boil:"-" json:"-" toml:"-" yaml:"-"`
}
CreditOperationGrant is an object representing the database table.
func FindCreditOperationGrant ¶
func FindCreditOperationGrant(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*CreditOperationGrant, error)
FindCreditOperationGrant retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*CreditOperationGrant) Delete ¶
func (o *CreditOperationGrant) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
Delete deletes a single CreditOperationGrant record with an executor. Delete will match against the primary key column to find the record to delete.
func (*CreditOperationGrant) Exists ¶
func (o *CreditOperationGrant) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)
Exists checks if the CreditOperationGrant row exists.
func (*CreditOperationGrant) GetGrant ¶
func (o *CreditOperationGrant) GetGrant() *CreditGrant
func (*CreditOperationGrant) Grant ¶
func (o *CreditOperationGrant) Grant(mods ...qm.QueryMod) creditGrantQuery
Grant pointed to by the foreign key.
func (*CreditOperationGrant) Insert ¶
func (o *CreditOperationGrant) 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 (*CreditOperationGrant) Reload ¶
func (o *CreditOperationGrant) Reload(ctx context.Context, exec boil.ContextExecutor) error
Reload refetches the object from the database using the primary keys with an executor.
func (*CreditOperationGrant) SetGrant ¶
func (o *CreditOperationGrant) SetGrant(ctx context.Context, exec boil.ContextExecutor, insert bool, related *CreditGrant) error
SetGrant of the creditOperationGrant to the related item. Sets o.R.Grant to related. Adds o to related.R.GrantCreditOperationGrants.
func (*CreditOperationGrant) Update ¶
func (o *CreditOperationGrant) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the CreditOperationGrant. 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 (*CreditOperationGrant) Upsert ¶
func (o *CreditOperationGrant) 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 CreditOperationGrantHook ¶
type CreditOperationGrantHook func(context.Context, boil.ContextExecutor, *CreditOperationGrant) error
CreditOperationGrantHook is the signature for custom CreditOperationGrant hook methods
type CreditOperationGrantSlice ¶
type CreditOperationGrantSlice []*CreditOperationGrant
CreditOperationGrantSlice is an alias for a slice of pointers to CreditOperationGrant. This should almost always be used instead of []CreditOperationGrant.
func (CreditOperationGrantSlice) DeleteAll ¶
func (o CreditOperationGrantSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*CreditOperationGrantSlice) ReloadAll ¶
func (o *CreditOperationGrantSlice) 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 (CreditOperationGrantSlice) UpdateAll ¶
func (o CreditOperationGrantSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type CreditOperationHook ¶
type CreditOperationHook func(context.Context, boil.ContextExecutor, *CreditOperation) error
CreditOperationHook is the signature for custom CreditOperation hook methods
type CreditOperationSlice ¶
type CreditOperationSlice []*CreditOperation
CreditOperationSlice is an alias for a slice of pointers to CreditOperation. This should almost always be used instead of []CreditOperation.
func (CreditOperationSlice) DeleteAll ¶
func (o CreditOperationSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*CreditOperationSlice) ReloadAll ¶
func (o *CreditOperationSlice) 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 (CreditOperationSlice) UpdateAll ¶
func (o CreditOperationSlice) 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 UpsertOptionFunc ¶
type UpsertOptionFunc func(o *UpsertOptions)
func UpsertConflictTarget ¶
func UpsertConflictTarget(conflictTarget string) UpsertOptionFunc
func UpsertUpdateSet ¶
func UpsertUpdateSet(updateSet string) UpsertOptionFunc
type UpsertOptions ¶
type UpsertOptions struct {
// contains filtered or unexported fields
}