Versions in this module Expand all Collapse all v2 v2.28.1 Sep 13, 2024 Changes in this version + const ClientName + const ClientTCPProtocolVersion + const ClientVersionMajor + const ClientVersionMinor + const ClientVersionPatch + const CompressionBrotli + const CompressionDeflate + const CompressionGZIP + const CompressionLZ4 + const CompressionNone + const CompressionZSTD + var ErrAcquireConnNoAddress = errors.New("clickhouse: no valid address supplied") + var ErrAcquireConnTimeout = errors.New(...) + var ErrBatchAlreadySent = errors.New("clickhouse: batch has already been sent") + var ErrBatchInvalid = errors.New("clickhouse: batch is invalid. check appended data is correct") + var ErrBatchNotSent = errors.New("clickhouse: invalid retry, batch not sent yet") + var ErrBindMixedParamsFormats = errors.New("clickhouse [bind]: mixed named, numeric or positional parameters") + var ErrExpectedStringValueInNamedValueForQueryParameter = errors.New("expected string value in NamedValue for query parameter") + var ErrServerUnexpectedData = errors.New("code: 101, message: Unexpected packet Data received from client") + var ErrUnsupportedServerRevision = errors.New("clickhouse: unsupported server revision") + func Connector(opt *Options) driver.Connector + func Context(parent context.Context, options ...QueryOption) context.Context + func DateNamed(name string, value time.Time, scale TimeUnit) driver.NamedDateValue + func Named(name string, value any) driver.NamedValue + func Open(opt *Options) (driver.Conn, error) + func OpenDB(opt *Options) *sql.DB + type ArraySet []any + type Auth struct + Database string + Password string + Username string + type ClientInfo struct + Products []struct{ ... } + func (o ClientInfo) String() string + type Compression struct + Level int + Method CompressionMethod + type CompressionMethod byte + func (c CompressionMethod) String() string + type Conn = driver.Conn + type ConnOpenStrategy uint8 + const ConnOpenInOrder + const ConnOpenRandom + const ConnOpenRoundRobin + type CustomSetting struct + Value string + type Dial func(ctx context.Context, addr string, opt *Options) (DialResult, error) + type DialResult struct + func DefaultDialStrategy(ctx context.Context, connID int, opt *Options, dial Dial) (r DialResult, err error) + type Exception = proto.Exception + type GroupSet struct + Value []any + type HTTPReaderWriter struct + func (rw *HTTPReaderWriter) NewReader(res *http.Response) (io.Reader, error) + type Log struct + Hostname string + Priority int8 + QueryID string + Source string + Text string + ThreadID uint64 + Time time.Time + TimeMicro uint32 + type OpError struct + ColumnName string + Err error + Op string + func (e *OpError) Error() string + type Options struct + Addr []string + Auth Auth + BlockBufferSize uint8 + ClientInfo ClientInfo + Compression *Compression + ConnMaxLifetime time.Duration + ConnOpenStrategy ConnOpenStrategy + Debug bool + Debugf func(format string, v ...any) + DialContext func(ctx context.Context, addr string) (net.Conn, error) + DialStrategy func(ctx context.Context, connID int, options *Options, dial Dial) (DialResult, error) + DialTimeout time.Duration + FreeBufOnConnRelease bool + HttpHeaders map[string]string + HttpUrlPath string + MaxCompressionBuffer int + MaxIdleConns int + MaxOpenConns int + Protocol Protocol + ReadTimeout time.Duration + Settings Settings + TLS *tls.Config + func ParseDSN(dsn string) (*Options, error) + type Parameters map[string]string + type Pool struct + func NewPool[T any](fn func() T) Pool[T] + func (p *Pool[T]) Get() T + func (p *Pool[T]) Put(x T) + type ProfileEvent struct + CurrentTime time.Time + Hostname string + Name string + ThreadID uint64 + Type string + Value int64 + type ProfileInfo = proto.ProfileInfo + type Progress = proto.Progress + type Protocol int + const HTTP + const Native + func (p Protocol) String() string + type QueryOption func(*QueryOptions) error + func WithBlockBufferSize(size uint8) QueryOption + func WithExternalTable(t ...*ext.Table) QueryOption + func WithLogs(fn func(*Log)) QueryOption + func WithParameters(params Parameters) QueryOption + func WithProfileEvents(fn func([]ProfileEvent)) QueryOption + func WithProfileInfo(fn func(*ProfileInfo)) QueryOption + func WithProgress(fn func(*Progress)) QueryOption + func WithQueryID(queryID string) QueryOption + func WithQuotaKey(quotaKey string) QueryOption + func WithSettings(settings Settings) QueryOption + func WithSpan(span trace.SpanContext) QueryOption + func WithStdAsync(wait bool) QueryOption + func WithUserLocation(location *time.Location) QueryOption + type QueryOptions struct + type ServerVersion = proto.ServerHandshake + type Settings map[string]any + type TimeUnit uint8 + const MicroSeconds + const MilliSeconds + const NanoSeconds + const Seconds