clickhouse

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: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnrichClickhouseContext added in v0.9.0

func EnrichClickhouseContext(ctx context.Context) context.Context

EnrichClickhouseContext wraps the context with ClickHouse-specific options: - log_comment setting with JSON query context (when query context is present) - WithProgress/WithProfileInfo callbacks (when a querystats callback is registered) Creates or reuses a DriverStats accumulator so the Collector in stdsql helpers can merge the driver-specific stats at Finish() time.

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 *ClickhouseExecutor) querier.Querier[T]

Types

type ClickhouseConf

type ClickhouseConf struct {
	Hostname        string
	Port            int
	Username        string
	Password        string
	DefaultDatabase string
	NoSsl           bool
}

type ClickhouseExecutor

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

func NewClickhouseExecutor

func NewClickhouseExecutor(ctx context.Context, conf *ClickhouseConf) (*ClickhouseExecutor, error)

func (*ClickhouseExecutor) Close

func (e *ClickhouseExecutor) Close() error

func (*ClickhouseExecutor) Exec

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

func (*ClickhouseExecutor) GetDb

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

func (*ClickhouseExecutor) QueryRow

func (e *ClickhouseExecutor) QueryRow(ctx context.Context, sql string, args ...interface{}) *sqlx.Row

func (*ClickhouseExecutor) QueryRows

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

func (*ClickhouseExecutor) Select added in v0.11.0

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