Documentation ¶
Overview ¶
Package pg contains generated code for schema 'public'.
Index ¶
- type BalanceQ
- func (q BalanceQ) BalanceByChainIDTokenAccountAddress(chainID int64, token, accountAddress []byte, isForUpdate bool) (*data.Balance, error)
- func (q BalanceQ) BalanceByChainIDTokenAccountAddressCtx(ctx context.Context, chainID int64, token, accountAddress []byte, ...) (*data.Balance, error)
- func (q BalanceQ) BalanceByID(id int64, isForUpdate bool) (*data.Balance, error)
- func (q BalanceQ) BalanceByIDCtx(ctx context.Context, id int64, isForUpdate bool) (*data.Balance, error)
- func (q BalanceQ) BalancesByAccountAddress(accountAddress []byte, isForUpdate bool) ([]data.Balance, error)
- func (q BalanceQ) BalancesByAccountAddressCtx(ctx context.Context, accountAddress []byte, isForUpdate bool) ([]data.Balance, error)
- func (q BalanceQ) BalancesByChainID(chainID int64, isForUpdate bool) ([]data.Balance, error)
- func (q BalanceQ) BalancesByChainIDCtx(ctx context.Context, chainID int64, isForUpdate bool) ([]data.Balance, error)
- func (q BalanceQ) BalancesByToken(token []byte, isForUpdate bool) ([]data.Balance, error)
- func (q BalanceQ) BalancesByTokenCtx(ctx context.Context, token []byte, isForUpdate bool) ([]data.Balance, error)
- func (q BalanceQ) Delete(b *data.Balance) error
- func (q BalanceQ) DeleteCtx(ctx context.Context, b *data.Balance) error
- func (q BalanceQ) Insert(b *data.Balance) error
- func (q BalanceQ) InsertBatchCtx(ctx context.Context, balances ...data.Balance) error
- func (q BalanceQ) InsertCtx(ctx context.Context, b *data.Balance) error
- func (q BalanceQ) SelectCtx(ctx context.Context, selector data.BalancesSelector) ([]data.Balance, error)
- func (q BalanceQ) Update(b *data.Balance) error
- func (q BalanceQ) UpdateCtx(ctx context.Context, b *data.Balance) error
- func (q BalanceQ) Upsert(b *data.Balance) error
- func (q BalanceQ) UpsertBatchCtx(ctx context.Context, balances ...data.Balance) error
- func (q BalanceQ) UpsertCtx(ctx context.Context, b *data.Balance) error
- type GorpMigrationQ
- func (q GorpMigrationQ) Delete(gm *data.GorpMigration) error
- func (q GorpMigrationQ) DeleteCtx(ctx context.Context, gm *data.GorpMigration) error
- func (q GorpMigrationQ) GorpMigrationByID(id string, isForUpdate bool) (*data.GorpMigration, error)
- func (q GorpMigrationQ) GorpMigrationByIDCtx(ctx context.Context, id string, isForUpdate bool) (*data.GorpMigration, error)
- func (q GorpMigrationQ) Insert(gm *data.GorpMigration) error
- func (q GorpMigrationQ) InsertCtx(ctx context.Context, gm *data.GorpMigration) error
- func (q GorpMigrationQ) Update(gm *data.GorpMigration) error
- func (q GorpMigrationQ) UpdateCtx(ctx context.Context, gm *data.GorpMigration) error
- func (q GorpMigrationQ) Upsert(gm *data.GorpMigration) error
- func (q GorpMigrationQ) UpsertCtx(ctx context.Context, gm *data.GorpMigration) error
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BalanceQ ¶
type BalanceQ struct {
// contains filtered or unexported fields
}
func (BalanceQ) BalanceByChainIDTokenAccountAddress ¶
func (q BalanceQ) BalanceByChainIDTokenAccountAddress(chainID int64, token, accountAddress []byte, isForUpdate bool) (*data.Balance, error)
BalanceByChainIDTokenAccountAddress retrieves a row from 'public.balances' as a Balance.
Generated from index 'balances_chain_id_token_account_address_key'.
func (BalanceQ) BalanceByChainIDTokenAccountAddressCtx ¶
func (q BalanceQ) BalanceByChainIDTokenAccountAddressCtx(ctx context.Context, chainID int64, token, accountAddress []byte, isForUpdate bool) (*data.Balance, error)
BalanceByChainIDTokenAccountAddressCtx retrieves a row from 'public.balances' as a Balance.
Generated from index 'balances_chain_id_token_account_address_key'.
func (BalanceQ) BalanceByID ¶
BalanceByID retrieves a row from 'public.balances' as a Balance.
Generated from index 'balances_pkey'.
func (BalanceQ) BalanceByIDCtx ¶
func (q BalanceQ) BalanceByIDCtx(ctx context.Context, id int64, isForUpdate bool) (*data.Balance, error)
BalanceByIDCtx retrieves a row from 'public.balances' as a Balance.
Generated from index 'balances_pkey'.
func (BalanceQ) BalancesByAccountAddress ¶
func (q BalanceQ) BalancesByAccountAddress(accountAddress []byte, isForUpdate bool) ([]data.Balance, error)
BalancesByAccountAddress retrieves a row from 'public.balances' as a Balance.
Generated from index 'balances_account_address_idx'.
func (BalanceQ) BalancesByAccountAddressCtx ¶
func (q BalanceQ) BalancesByAccountAddressCtx(ctx context.Context, accountAddress []byte, isForUpdate bool) ([]data.Balance, error)
BalancesByAccountAddressCtx retrieves a row from 'public.balances' as a Balance.
Generated from index 'balances_account_address_idx'.
func (BalanceQ) BalancesByChainID ¶
BalancesByChainID retrieves a row from 'public.balances' as a Balance.
Generated from index 'balances_chain_id_idx'.
func (BalanceQ) BalancesByChainIDCtx ¶
func (q BalanceQ) BalancesByChainIDCtx(ctx context.Context, chainID int64, isForUpdate bool) ([]data.Balance, error)
BalancesByChainIDCtx retrieves a row from 'public.balances' as a Balance.
Generated from index 'balances_chain_id_idx'.
func (BalanceQ) BalancesByToken ¶
BalancesByToken retrieves a row from 'public.balances' as a Balance.
Generated from index 'balances_token_idx'.
func (BalanceQ) BalancesByTokenCtx ¶
func (q BalanceQ) BalancesByTokenCtx(ctx context.Context, token []byte, isForUpdate bool) ([]data.Balance, error)
BalancesByTokenCtx retrieves a row from 'public.balances' as a Balance.
Generated from index 'balances_token_idx'.
func (BalanceQ) InsertBatchCtx ¶
func (BalanceQ) UpsertBatchCtx ¶
type GorpMigrationQ ¶
type GorpMigrationQ struct {
// contains filtered or unexported fields
}
func NewGorpMigrationQ ¶
func NewGorpMigrationQ(db *pgdb.DB) GorpMigrationQ
NewGorpMigrationQ - creates new instance
func (GorpMigrationQ) Delete ¶
func (q GorpMigrationQ) Delete(gm *data.GorpMigration) error
Delete deletes the GorpMigration from the database.
func (GorpMigrationQ) DeleteCtx ¶
func (q GorpMigrationQ) DeleteCtx(ctx context.Context, gm *data.GorpMigration) error
DeleteCtx deletes the GorpMigration from the database.
func (GorpMigrationQ) GorpMigrationByID ¶
func (q GorpMigrationQ) GorpMigrationByID(id string, isForUpdate bool) (*data.GorpMigration, error)
GorpMigrationByID retrieves a row from 'public.gorp_migrations' as a GorpMigration.
Generated from index 'gorp_migrations_pkey'.
func (GorpMigrationQ) GorpMigrationByIDCtx ¶
func (q GorpMigrationQ) GorpMigrationByIDCtx(ctx context.Context, id string, isForUpdate bool) (*data.GorpMigration, error)
GorpMigrationByIDCtx retrieves a row from 'public.gorp_migrations' as a GorpMigration.
Generated from index 'gorp_migrations_pkey'.
func (GorpMigrationQ) Insert ¶
func (q GorpMigrationQ) Insert(gm *data.GorpMigration) error
Insert insert a GorpMigration to the database.
func (GorpMigrationQ) InsertCtx ¶
func (q GorpMigrationQ) InsertCtx(ctx context.Context, gm *data.GorpMigration) error
InsertCtx inserts a GorpMigration to the database.
func (GorpMigrationQ) Update ¶
func (q GorpMigrationQ) Update(gm *data.GorpMigration) error
Update updates a GorpMigration in the database.
func (GorpMigrationQ) UpdateCtx ¶
func (q GorpMigrationQ) UpdateCtx(ctx context.Context, gm *data.GorpMigration) error
UpdateCtx updates a GorpMigration in the database.
func (GorpMigrationQ) Upsert ¶
func (q GorpMigrationQ) Upsert(gm *data.GorpMigration) error
Upsert performs an upsert for GorpMigration.
func (GorpMigrationQ) UpsertCtx ¶
func (q GorpMigrationQ) UpsertCtx(ctx context.Context, gm *data.GorpMigration) error
UpsertCtx performs an upsert for GorpMigration.
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage is the helper struct for database operations
func (Storage) GorpMigrationQ ¶
func (s Storage) GorpMigrationQ() data.GorpMigrationQ
GorpMigrationQ - creates new instance of GorpMigrationQ
func (*Storage) Transaction ¶
Transaction begins a transaction on repo.