postgres

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFilterStore

func NewFilterStore(chainID string, orm *DSORM, lggr logger.Logger) logpoller.FilterStore

func NewLogStore

func NewLogStore(chainID string, orm *DSORM, lggr logger.Logger) logpoller.LogStore

NewLogStore creates a new PostgreSQL-based log store

Types

type DSORM

type DSORM struct {
	// contains filtered or unexported fields
}

DSORM provides database operations for the TON log poller

func NewORM

func NewORM(chainID string, ds sqlutil.DataSource, lggr logger.Logger) *DSORM

NewORM creates a new ORM instance

func (*DSORM) ChainID

func (o *DSORM) ChainID() string

ChainID returns the chainID for validation purposes

func (*DSORM) NamedExecContext

func (o *DSORM) NamedExecContext(ctx context.Context, query string, args any) (int64, error)

NamedExecContext executes a named query with struct/map arguments and returns rows affected

func (*DSORM) NamedGetContext

func (o *DSORM) NamedGetContext(ctx context.Context, dest any, query string, arg any) error

NamedGetContext executes a named query and scans the result into dest (for single row queries)

func (*DSORM) NamedSelectContext

func (o *DSORM) NamedSelectContext(ctx context.Context, dest any, query string, arg any) error

NamedSelectContext executes a SELECT query with named parameters (for multiple rows)

func (*DSORM) Transact

func (o *DSORM) Transact(ctx context.Context, fn func(*DSORM) error) error

Transact wraps the provided function in a database transaction

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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