Documentation
¶
Index ¶
- func IsAuthError(err error) bool
- func IsPermissionError(err error) bool
- func NewQuerier[T any](conn *RedshiftExecutor) querier.Querier[T]
- type Executor
- type RedshiftConf
- type RedshiftExecutor
- func (e *RedshiftExecutor) Close() error
- func (e *RedshiftExecutor) Exec(ctx context.Context, query string, args ...any) error
- func (e *RedshiftExecutor) GetDb() *sqlx.DB
- func (e *RedshiftExecutor) QueryRows(ctx context.Context, sql string, args ...interface{}) (*sqlx.Rows, error)
- func (e *RedshiftExecutor) Select(ctx context.Context, dest any, query string, args ...any) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsAuthError ¶ added in v0.23.0
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
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 RedshiftConf ¶
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) GetDb ¶
func (e *RedshiftExecutor) GetDb() *sqlx.DB
Click to show internal directories.
Click to hide internal directories.