Documentation ¶
Index ¶
- Variables
- func Address(query *bun.SelectQuery, address string) *bun.SelectQuery
- func Contract(query *bun.SelectQuery, address string) *bun.SelectQuery
- func GetFieldsForModel(data interface{}, fields ...string) map[string]interface{}
- func IsApplied(db *bun.SelectQuery) *bun.SelectQuery
- func OrderByLevelDesc(db *bun.SelectQuery) *bun.SelectQuery
- func Token(query *bun.SelectQuery, contract string, tokenID uint64) *bun.SelectQuery
- type Config
- type Postgres
- func (p *Postgres) Close() error
- func (p *Postgres) CreateIndex(ctx context.Context, name, columns string, model any) error
- func (p *Postgres) Drop(ctx context.Context) error
- func (p *Postgres) Execute(rawSQL string) error
- func (p *Postgres) GetByID(ctx context.Context, output models.Model) error
- func (pg *Postgres) GetPageSize(size int64) int
- func (p *Postgres) InitDatabase(ctx context.Context) error
- func (p *Postgres) IsRecordNotFound(err error) bool
- func (p *Postgres) TablesExist(ctx context.Context) bool
- type PostgresOption
- type TimestampFilter
- type Transaction
- func (t Transaction) Accounts(ctx context.Context, accounts ...*account.Account) error
- func (t Transaction) BabylonUpdateBigMapDiffs(ctx context.Context, contract string, ptr int64) (int, error)
- func (t Transaction) BabylonUpdateNonDelegator(ctx context.Context, contract *contract.Contract) error
- func (t Transaction) BigMapActions(ctx context.Context, bigmapactions ...*bigmapaction.BigMapAction) error
- func (t Transaction) BigMapDiffs(ctx context.Context, bigmapdiffs ...*bigmapdiff.BigMapDiff) error
- func (t Transaction) BigMapStates(ctx context.Context, states ...*bigmapdiff.BigMapState) error
- func (t Transaction) Block(ctx context.Context, block *block.Block) error
- func (t Transaction) Commit() error
- func (t Transaction) Contracts(ctx context.Context, contracts ...*contract.Contract) error
- func (t Transaction) DeleteBigMapStatesByContract(ctx context.Context, contract string) (states []bigmapdiff.BigMapState, err error)
- func (t Transaction) GlobalConstants(ctx context.Context, constants ...*contract.GlobalConstant) error
- func (t Transaction) JakartaUpdateNonDelegator(ctx context.Context, contract *contract.Contract) error
- func (t Transaction) JakartaVesting(ctx context.Context, contract *contract.Contract) error
- func (t Transaction) Migrations(ctx context.Context, migrations ...*migration.Migration) error
- func (t Transaction) Operations(ctx context.Context, operations ...*operation.Operation) error
- func (t Transaction) Protocol(ctx context.Context, proto *protocol.Protocol) error
- func (t Transaction) Rollback() error
- func (t Transaction) Save(ctx context.Context, data any) error
- func (t Transaction) ScriptConstant(ctx context.Context, relations ...*contract.ScriptConstants) error
- func (t Transaction) Scripts(ctx context.Context, scripts ...*contract.Script) error
- func (t Transaction) SmartRollups(ctx context.Context, rollups ...*smartrollup.SmartRollup) error
- func (t Transaction) TickerUpdates(ctx context.Context, updates ...*ticket.TicketUpdate) error
- func (t Transaction) TicketBalances(ctx context.Context, balances ...*ticket.Balance) error
- func (t Transaction) Tickets(ctx context.Context, tickets ...*ticket.Ticket) error
- func (t Transaction) ToBabylon(ctx context.Context) error
- func (t Transaction) ToJakarta(ctx context.Context) error
- func (t Transaction) UpdateStats(ctx context.Context, stats stats.Stats) error
Constants ¶
This section is empty.
Variables ¶
EmptyRelation -
Functions ¶
func GetFieldsForModel ¶
GetFieldsForModel -
func OrderByLevelDesc ¶
func OrderByLevelDesc(db *bun.SelectQuery) *bun.SelectQuery
OrderByLevelDesc -
func Token ¶
func Token(query *bun.SelectQuery, contract string, tokenID uint64) *bun.SelectQuery
Token -
Types ¶
type Config ¶
type Postgres ¶
Postgres -
func New ¶
func New(cfg Config, schemaName, appName string, opts ...PostgresOption) (*Postgres, error)
New -
func WaitNew ¶
func WaitNew(cfg Config, schemaName, appName string, timeout int, opts ...PostgresOption) *Postgres
WaitNew - waiting for db up and creating connection
func (*Postgres) CreateIndex ¶
func (*Postgres) GetPageSize ¶
GetPageSize - validate and return page size
func (*Postgres) IsRecordNotFound ¶
IsRecordNotFound -
type TimestampFilter ¶
TimestampFilter -
func (TimestampFilter) Apply ¶
func (tf TimestampFilter) Apply(q *bun.SelectQuery) *bun.SelectQuery
Apply -
type Transaction ¶
type Transaction struct {
// contains filtered or unexported fields
}
func NewTransaction ¶
NewTransaction -
func (Transaction) BabylonUpdateBigMapDiffs ¶
func (Transaction) BabylonUpdateNonDelegator ¶
func (Transaction) BigMapActions ¶
func (t Transaction) BigMapActions(ctx context.Context, bigmapactions ...*bigmapaction.BigMapAction) error
func (Transaction) BigMapDiffs ¶
func (t Transaction) BigMapDiffs(ctx context.Context, bigmapdiffs ...*bigmapdiff.BigMapDiff) error
func (Transaction) BigMapStates ¶
func (t Transaction) BigMapStates(ctx context.Context, states ...*bigmapdiff.BigMapState) error
func (Transaction) Commit ¶
func (t Transaction) Commit() error
func (Transaction) DeleteBigMapStatesByContract ¶
func (t Transaction) DeleteBigMapStatesByContract(ctx context.Context, contract string) (states []bigmapdiff.BigMapState, err error)
func (Transaction) GlobalConstants ¶
func (t Transaction) GlobalConstants(ctx context.Context, constants ...*contract.GlobalConstant) error
func (Transaction) JakartaUpdateNonDelegator ¶
func (Transaction) JakartaVesting ¶
func (Transaction) Migrations ¶
func (Transaction) Operations ¶
func (Transaction) Rollback ¶
func (t Transaction) Rollback() error
func (Transaction) ScriptConstant ¶
func (t Transaction) ScriptConstant(ctx context.Context, relations ...*contract.ScriptConstants) error
func (Transaction) SmartRollups ¶
func (t Transaction) SmartRollups(ctx context.Context, rollups ...*smartrollup.SmartRollup) error
func (Transaction) TickerUpdates ¶
func (t Transaction) TickerUpdates(ctx context.Context, updates ...*ticket.TicketUpdate) error
func (Transaction) TicketBalances ¶
func (Transaction) UpdateStats ¶
Click to show internal directories.
Click to hide internal directories.