clickhouse-go: Index | Files | Directories

package clickhouse

import ""


Package Files

array.go bootstrap.go clickhouse.go clickhouse_exception.go clickhouse_ping.go clickhouse_profile_info.go clickhouse_progress.go clickhouse_read_block.go clickhouse_read_meta.go clickhouse_send_external_data.go clickhouse_send_query.go clickhouse_write_block.go connect.go helpers.go query_settings.go result.go rows.go stmt.go tls_config.go word_matcher.go write_column.go


const (
    // DefaultDatabase when connecting to ClickHouse
    DefaultDatabase = "default"
    // DefaultUsername when connecting to ClickHouse
    DefaultUsername = "default"
    // DefaultConnTimeout when connecting to ClickHouse
    DefaultConnTimeout = 5 * time.Second
    // DefaultReadTimeout when reading query results
    DefaultReadTimeout = time.Minute
    // DefaultWriteTimeout when sending queries
    DefaultWriteTimeout = time.Minute


var (
    ErrInsertInNotBatchMode = errors.New("insert statement supported only in the batch mode (use begin/commit)")
    ErrLimitDataRequestInTx = errors.New("data request has already been prepared in transaction")

func Array Uses

func Array(v interface{}) interface{}

func ArrayDate Uses

func ArrayDate(v []time.Time) interface{}

func ArrayDateTime Uses

func ArrayDateTime(v []time.Time) interface{}

func ArrayFixedString Uses

func ArrayFixedString(len int, v interface{}) interface{}

func DeregisterTLSConfig Uses

func DeregisterTLSConfig(key string)

DeregisterTLSConfig removes the tls.Config associated with key.

func Open Uses

func Open(dsn string) (driver.Conn, error)

Open the connection

func RegisterTLSConfig Uses

func RegisterTLSConfig(key string, config *tls.Config) error

RegisterTLSConfig registers a custom tls.Config to be used with sql.Open.

func SetLogOutput Uses

func SetLogOutput(output io.Writer)

SetLogOutput allows to change output of the default logger

type Clickhouse Uses

type Clickhouse interface {
    Block() (*data.Block, error)
    Prepare(query string) (driver.Stmt, error)
    Begin() (driver.Tx, error)
    Commit() error
    Rollback() error
    Close() error
    WriteBlock(block *data.Block) error

Interface for Clickhouse driver

func OpenDirect Uses

func OpenDirect(dsn string) (Clickhouse, error)

type ColumnWriter Uses

type ColumnWriter interface {
    WriteDate(c int, v time.Time) error
    WriteDateTime(c int, v time.Time) error
    WriteUInt8(c int, v uint8) error
    WriteUInt16(c int, v uint16) error
    WriteUInt32(c int, v uint32) error
    WriteUInt64(c int, v uint64) error
    WriteFloat32(c int, v float32) error
    WriteFloat64(c int, v float64) error
    WriteBytes(c int, v []byte) error
    WriteArray(c int, v interface{}) error
    WriteString(c int, v string) error
    WriteFixedString(c int, v []byte) error

Interface for Block allowing writes to individual columns

type Date Uses

type Date = types.Date

type DateTime Uses

type DateTime = types.DateTime

type Exception Uses

type Exception struct {
    Code       int32
    Name       string
    Message    string
    StackTrace string
    // contains filtered or unexported fields

func (*Exception) Error Uses

func (e *Exception) Error() string

type ExternalTable Uses

type ExternalTable struct {
    Name    string
    Values  [][]driver.Value
    Columns []column.Column

type UUID Uses

type UUID = types.UUID



Package clickhouse imports 28 packages (graph) and is imported by 24 packages. Updated 2021-01-14. Refresh now. Tools for package owners.