trino

package
v0.16.0-rc1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsPermissionError added in v0.15.3

func IsPermissionError(err error) bool

IsPermissionError reports whether err indicates the DWH credentials lack the privileges required for the attempted operation.

Trino-specific permission classification is not implemented yet; callers get the conservative answer (treat as a non-permission error).

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, query string, args ...any) 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)

func (*TrinoExecutor) Select added in v0.11.0

func (e *TrinoExecutor) Select(ctx context.Context, dest any, query string, args ...any) error

Jump to

Keyboard shortcuts

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