Documentation ¶
Index ¶
- Variables
- 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 interface{}) driver.NamedValue
- func Open(opt *Options) (driver.Conn, error)
- func OpenDB(opt *Options) *sql.DB
- type Auth
- type Compression
- type Conn
- type ConnOpenStrategy
- type Exception
- type GroupSet
- type InterfaceType
- type Log
- type OpError
- type Options
- type ProfileEvent
- type ProfileInfo
- type Progress
- type QueryOption
- func WithExternalTable(t ...*ext.Table) QueryOption
- func WithLogs(fn func(*Log)) 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
- type QueryOptions
- type ServerVersion
- type Settings
- type TimeUnit
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrBatchAlreadySent = errors.New("clickhouse: batch has already been sent") ErrAcquireConnTimeout = errors.New("clickhouse: acquire conn timeout. you can increase the number of max open conn or the dial timeout") ErrUnsupportedServerRevision = errors.New("clickhouse: unsupported server revision") ErrBindMixedParamsFormats = errors.New("clickhouse [bind]: mixed named, numeric or positional parameters") ErrAcquireConnNoAddress = errors.New("clickhouse: no valid address supplied") )
View Source
var CompressionLZ4 compress.Method = compress.LZ4
View Source
var ErrHttpNotSupported = errors.New("HTTP: not supported")
Functions ¶
func Named ¶
func Named(name string, value interface{}) driver.NamedValue
Types ¶
type Compression ¶
type ConnOpenStrategy ¶
type ConnOpenStrategy uint8
const ( ConnOpenInOrder ConnOpenStrategy = iota ConnOpenRoundRobin )
type InterfaceType ¶
type InterfaceType int
const ( NativeInterface InterfaceType = iota HttpInterface )
type Options ¶
type Options struct { Interface InterfaceType TLS *tls.Config Addr []string Auth Auth DialContext func(ctx context.Context, addr string) (net.Conn, error) Debug bool Debugf func(format string, v ...interface{}) // only works when Debug is true Settings Settings Compression *Compression DialTimeout time.Duration // default 1 second MaxOpenConns int // default MaxIdleConns + 5 MaxIdleConns int // default 5 ConnMaxLifetime time.Duration // default 1 hour ConnOpenStrategy ConnOpenStrategy ReadTimeout time.Duration }
type ProfileEvent ¶
type ProfileInfo ¶
type ProfileInfo = proto.ProfileInfo
type QueryOption ¶
type QueryOption func(*QueryOptions) error
func WithExternalTable ¶
func WithExternalTable(t ...*ext.Table) QueryOption
func WithLogs ¶
func WithLogs(fn func(*Log)) QueryOption
func WithProfileEvents ¶
func WithProfileEvents(fn func([]ProfileEvent)) QueryOption
func WithProfileInfo ¶
func WithProfileInfo(fn func(*ProfileInfo)) 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
func WithStdAsync ¶
func WithStdAsync(wait bool) QueryOption
type QueryOptions ¶
type QueryOptions struct {
// contains filtered or unexported fields
}
type ServerVersion ¶
type ServerVersion = proto.ServerHandshake
Source Files ¶
- bind.go
- clickhouse.go
- clickhouse_options.go
- clickhouse_rows.go
- clickhouse_rows_column_type.go
- clickhouse_std.go
- conn.go
- conn_async_insert.go
- conn_batch.go
- conn_check.go
- conn_exec.go
- conn_handshake.go
- conn_http.go
- conn_logs.go
- conn_ping.go
- conn_process.go
- conn_profile_events.go
- conn_query.go
- conn_send_query.go
- context.go
- scan.go
- struct_map.go
Directories ¶
Path | Synopsis |
---|---|
benchmark
|
|
examples
|
|
lib
|
|
cityhash102
* COPY from https://github.com/zentures/cityhash/ NOTE: The code is modified to be compatible with CityHash128 used in ClickHouse
|
* COPY from https://github.com/zentures/cityhash/ NOTE: The code is modified to be compatible with CityHash128 used in ClickHouse |
issues/485
Licensed to ClickHouse, Inc.
|
Licensed to ClickHouse, Inc. |
Click to show internal directories.
Click to hide internal directories.