clickhouseclient

package
v1.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 21, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicAuth

type BasicAuth struct {
	Username string
	Password string
}

func (*BasicAuth) ValidateConfig

func (b *BasicAuth) ValidateConfig() (bool, []string)

type ClickhouseClient

type ClickhouseClient interface {
	Select(ctx context.Context, qry string, callback func(Row) error) error
	Exec(ctx context.Context, qry string) error
}

func NewHTTPClient

func NewHTTPClient(config HTTPClientConfig) (ClickhouseClient, error)

func NewNativeClient

func NewNativeClient(config NativeClientConfig) (ClickhouseClient, error)

type HTTPClientConfig

type HTTPClientConfig struct {
	Protocol  string
	Host      string
	Port      uint16
	BasicAuth *BasicAuth
	TLSConfig *tls.Config
}

type NativeClientConfig

type NativeClientConfig struct {
	Host             string
	Port             uint16
	UserPasswordAuth *UserPasswordAuth
	EnableTLS        bool
}

type Row

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

func (*Row) GetBool

func (r *Row) GetBool(fieldName string) (bool, error)

func (*Row) GetNullableString

func (r *Row) GetNullableString(fieldName string) (*string, error)

func (*Row) GetString

func (r *Row) GetString(fieldName string) (string, error)

func (*Row) GetUInt64 added in v1.1.0

func (r *Row) GetUInt64(fieldName string) (uint64, error)

func (*Row) Set

func (r *Row) Set(fieldName string, val interface{})

type UserPasswordAuth

type UserPasswordAuth struct {
	Username string
	Password string
	Database string
}

func (*UserPasswordAuth) ValidateConfig

func (u *UserPasswordAuth) ValidateConfig() (bool, []string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL