v2 – github.com/ClickHouse/clickhouse-go/v2 Index | Files | Directories

package clickhouse

import "github.com/ClickHouse/clickhouse-go/v2"

Index

Variables

var (
	CompressionLZ4 compress.Method = compress.LZ4
)
var ErrUnsupportedServerRevision = errors.New("unsupported server revision")

Functions

func Context

func Context(parent context.Context, options ...QueryOption) context.Context

func Named

func Named(name string, value interface{}) driver.NamedValue

func Open

func Open(opt *Options) (driver.Conn, error)

Types

type AcquireConnTimeout

type AcquireConnTimeout struct {
}

func (*AcquireConnTimeout) Error

func (e *AcquireConnTimeout) Error() string

type Auth

type Auth struct {
	Database string
	Username string
	Password string
}

type BatchAlreadySent

type BatchAlreadySent struct{}

func (*BatchAlreadySent) Error

func (e *BatchAlreadySent) Error() string

type BindMixedNamedAndNumericParams

type BindMixedNamedAndNumericParams struct{}

func (*BindMixedNamedAndNumericParams) Error

type Compression

type Compression struct {
	Method compress.Method
}

type Conn

type Conn = driver.Conn

type ConnOpenStrategy

type ConnOpenStrategy uint8
const (
	ConnOpenInOrder ConnOpenStrategy = iota
	ConnOpenRoundRobin
)

type Date

type Date time.Time

type DateTime

type DateTime time.Time

type Exception

type Exception = proto.Exception

type InvalidColumnIndex

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

func (*InvalidColumnIndex) Error

func (e *InvalidColumnIndex) Error() string

type Log

type Log struct {
	Time      time.Time
	TimeMicro uint32
	Hostname  string
	QueryID   string
	ThreadID  uint64
	Priority  int8
	Source    string
	Text      string
}

type Options

type Options struct {
	TLS              *tls.Config
	Addr             []string
	Auth             Auth
	Debug            bool
	Settings         Settings
	DialTimeout      time.Duration
	Compression      *Compression
	MaxOpenConns     int
	MaxIdleConns     int
	ConnMaxLifetime  time.Duration
	ConnOpenStrategy ConnOpenStrategy
}

type ProfileEvent

type ProfileEvent struct {
	Hostname    string
	CurrentTime time.Time
	ThreadID    uint64
	Type        string
	Name        string
	Value       int64
}

type Progress

type Progress = proto.Progress

type QueryOption

type QueryOption func(*QueryOptions) error

func WithExternalTable

func WithExternalTable(t ...*external.Table) QueryOption

func WithLogs

func WithLogs(fn func(*Log)) QueryOption

func WithProfileEvents

func WithProfileEvents(fn func([]ProfileEvent)) QueryOption

func WithProgress

func WithProgress(fn func(*Progress)) QueryOption

func WithQueryID

func WithQueryID(queryID string) QueryOption

func WithQuotaKey

func WithQuotaKey(quotaKey string) QueryOption

func WithSettings

func WithSettings(settings Settings) QueryOption

func WithSpan

func WithSpan(span trace.SpanContext) QueryOption

type QueryOptions

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

type ScanStructErr

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

func (*ScanStructErr) Error

func (e *ScanStructErr) Error() string

type ServerVersion

type ServerVersion = proto.ServerHandshake

type Settings

type Settings map[string]interface{}

type UnexpectedArguments

type UnexpectedArguments = proto.UnexpectedArguments

type UnexpectedPacket

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

func (*UnexpectedPacket) Error

func (e *UnexpectedPacket) Error() string

type UnexpectedScanDestination

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

func (*UnexpectedScanDestination) Error

func (e *UnexpectedScanDestination) Error() string

Source Files

bind.go clickhouse.go clickhouse_options.go clickhouse_rows.go clickhouse_std.go conn.go conn_batch.go conn_exec.go conn_handshake.go conn_logs.go conn_ping.go conn_process.go conn_profile_events.go conn_query.go conn_send_query.go context.go errors.go scan.go

Directories

PathSynopsis
benchmark
benchmark/v1
benchmark/v1/read
benchmark/v1/write
benchmark/v2
benchmark/v2/read
benchmark/v2/read-native
benchmark/v2/write
benchmark/v2/write-native
benchmark/v2/write-native-columnar
examples
examples/native
examples/std
external
lib
lib/binary
lib/cityhash102* COPY from https://github.com/zentures/cityhash/
lib/column
lib/column/codegen
lib/compress
lib/driver
lib/io
lib/proto
lib/timezone
tests
tests/issues
tests/std
tests/stress
Version
v2.0.0-alpha.2
Published
Jan 18, 2022
Platform
js/wasm
Imports
25 packages
Last checked
now

Tools for package owners.