Help us shape the future of Go! Take the 2026 Go Developer Survey

redshift

package
v0.23.0-rc4 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAuthError added in v0.23.0

func IsAuthError(err error) bool

IsAuthError reports whether err is the cluster rejecting the login: a wrong password (28P01) or a user it does not let in (28000).

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.

func NewQuerier

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

Types

type Executor

type Executor interface {
	stdsql.StdSqlExecutor
	QueryRows(ctx context.Context, q string, args ...interface{}) (*sqlx.Rows, error)
}

type RedshiftConf

type RedshiftConf struct {
	User      string
	Password  string
	Database  string
	Host      string
	Port      int
	SSHTunnel *sshtunnel.SshTunnel
}

type RedshiftExecutor

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

func NewRedshiftExecutor

func NewRedshiftExecutor(ctx context.Context, conf *RedshiftConf) (*RedshiftExecutor, error)

func NewRedshiftExecutorFromDb added in v0.23.0

func NewRedshiftExecutorFromDb(conf *RedshiftConf, db *sqlx.DB) *RedshiftExecutor

NewRedshiftExecutorFromDb wraps a connection the caller already opened, such as one over a fake driver in a test. It does not ping it.

func (*RedshiftExecutor) Close

func (e *RedshiftExecutor) Close() error

func (*RedshiftExecutor) Exec

func (e *RedshiftExecutor) Exec(ctx context.Context, query string, args ...any) error

func (*RedshiftExecutor) GetDb

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

func (*RedshiftExecutor) QueryRows

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

func (*RedshiftExecutor) Select added in v0.11.0

func (e *RedshiftExecutor) 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