trino

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewQuerier

func NewQuerier[T any](conn *TrinoExecutor) querier.Querier[T]

Types

type Executor

type Executor interface {
	stdsql.StdSqlExecutor
}

type Querier added in v0.4.3

type Querier[T any] struct {
	// contains filtered or unexported fields
}

func (*Querier[T]) Close added in v0.4.3

func (q *Querier[T]) Close() error

func (*Querier[T]) Exec added in v0.4.3

func (q *Querier[T]) Exec(ctx context.Context, sql string) error

func (*Querier[T]) QueryAndProcessMany added in v0.4.3

func (q *Querier[T]) QueryAndProcessMany(
	ctx context.Context,
	sql string,
	handler func(ctx context.Context, batch []*T) error,
	opts ...exec.QueryManyOpt[T],
) error

func (*Querier[T]) QueryMany added in v0.4.3

func (q *Querier[T]) QueryMany(ctx context.Context, sql string, opts ...exec.QueryManyOpt[T]) ([]*T, error)

func (*Querier[T]) QueryMaps added in v0.4.3

func (q *Querier[T]) QueryMaps(ctx context.Context, sql string) ([]exec.QueryMapResult, error)

type TrinoConf

type TrinoConf struct {
	Host      string
	Port      int
	Plaintext bool
	User      string
	Password  string
	Source    string // optional, e.g. "synq"
}

type TrinoExecutor

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

func NewTrinoExecutor

func NewTrinoExecutor(ctx context.Context, conf *TrinoConf) (*TrinoExecutor, error)

func (*TrinoExecutor) Close

func (e *TrinoExecutor) Close() error

func (*TrinoExecutor) Exec

func (e *TrinoExecutor) Exec(ctx context.Context, q string) error

func (*TrinoExecutor) GetDb

func (e *TrinoExecutor) GetDb() *sqlx.DB

func (*TrinoExecutor) QueryRows

func (e *TrinoExecutor) QueryRows(ctx context.Context, sql string, args ...interface{}) (*sqlx.Rows, error)

Jump to

Keyboard shortcuts

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