pg

package
v0.0.0-...-bd92ab4 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package pg contains generated code for schema 'public'.

Index

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 NewBalanceQ

func NewBalanceQ(db *pgdb.DB) BalanceQ

NewBalanceQ - creates new instance

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

func (q BalanceQ) BalanceByID(id int64, isForUpdate bool) (*data.Balance, error)

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

func (q BalanceQ) BalancesByChainID(chainID int64, isForUpdate bool) ([]data.Balance, error)

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

func (q BalanceQ) BalancesByToken(token []byte, isForUpdate bool) ([]data.Balance, error)

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) Delete

func (q BalanceQ) Delete(b *data.Balance) error

Delete deletes the Balance from the database.

func (BalanceQ) DeleteCtx

func (q BalanceQ) DeleteCtx(ctx context.Context, b *data.Balance) error

DeleteCtx deletes the Balance from the database.

func (BalanceQ) Insert

func (q BalanceQ) Insert(b *data.Balance) error

Insert insert a Balance to the database.

func (BalanceQ) InsertBatchCtx

func (q BalanceQ) InsertBatchCtx(ctx context.Context, balances ...data.Balance) error

func (BalanceQ) InsertCtx

func (q BalanceQ) InsertCtx(ctx context.Context, b *data.Balance) error

InsertCtx inserts a Balance to the database.

func (BalanceQ) SelectCtx

func (q BalanceQ) SelectCtx(ctx context.Context, selector data.BalancesSelector) ([]data.Balance, error)

func (BalanceQ) Update

func (q BalanceQ) Update(b *data.Balance) error

Update updates a Balance in the database.

func (BalanceQ) UpdateCtx

func (q BalanceQ) UpdateCtx(ctx context.Context, b *data.Balance) error

UpdateCtx updates a Balance in the database.

func (BalanceQ) Upsert

func (q BalanceQ) Upsert(b *data.Balance) error

Upsert performs an upsert for Balance.

func (BalanceQ) UpsertBatchCtx

func (q BalanceQ) UpsertBatchCtx(ctx context.Context, balances ...data.Balance) error

func (BalanceQ) UpsertCtx

func (q BalanceQ) UpsertCtx(ctx context.Context, b *data.Balance) error

UpsertCtx performs an upsert for Balance.

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 New

func New(db *pgdb.DB) *Storage

New - returns new instance of storage

func (Storage) BalanceQ

func (s Storage) BalanceQ() data.BalanceQ

BalanceQ - creates new instance of BalanceQ

func (*Storage) Clone

func (s *Storage) Clone() data.Storage

Clone - returns new storage with clone of db

func (*Storage) DB

func (s *Storage) DB() *pgdb.DB

DB - returns db used by Storage

func (Storage) GorpMigrationQ

func (s Storage) GorpMigrationQ() data.GorpMigrationQ

GorpMigrationQ - creates new instance of GorpMigrationQ

func (*Storage) Transaction

func (s *Storage) Transaction(tx func() error) error

Transaction begins a transaction on repo.

Jump to

Keyboard shortcuts

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