trino

package
v0.5.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2025 License: Apache-2.0 Imports: 10 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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