clickhouse_api

package
v2.32.2 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2025 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const TestSet string = "examples_clickhouse_api"

Variables

This section is empty.

Functions

func AppendStruct

func AppendStruct() error

func ArrayInsertRead

func ArrayInsertRead() error

func AsyncInsert

func AsyncInsert() error

func Auth

func Auth() error

func BatchInsert

func BatchInsert() error

func BatchWithReleaseConnection added in v2.13.0

func BatchWithReleaseConnection() error

func BindParameters

func BindParameters() error

func CheckMinServerVersion added in v2.30.1

func CheckMinServerVersion(conn driver.Conn, major, minor, patch uint64) bool

func ClientInfo added in v2.6.0

func ClientInfo() error

func ColumnInsert

func ColumnInsert() error

func Compress

func Compress() error

func Connect

func Connect() error

func ConvertedInsert

func ConvertedInsert() error

func CustomTypes added in v2.5.0

func CustomTypes() error

func DynamicExample added in v2.30.1

func DynamicExample() error

func DynamicScan

func DynamicScan() error

func Exec

func Exec() error

func ExternalData

func ExternalData() error

func GeoInsertRead

func GeoInsertRead() error

func GetNativeConnection

func GetNativeConnection(settings clickhouse.Settings, tlsConfig *tls.Config, compression *clickhouse.Compression) (driver.Conn, error)

func GetNativeConnectionWithOptions added in v2.6.0

func GetNativeConnectionWithOptions(settings clickhouse.Settings, tlsConfig *tls.Config, compression *clickhouse.Compression) (driver.Conn, error)

func IterableOrderedMapInsertRead added in v2.17.0

func IterableOrderedMapInsertRead() error

func JSONFastStructExample added in v2.31.0

func JSONFastStructExample() error

func JSONPathsExample added in v2.30.1

func JSONPathsExample() error

func JSONStringExample added in v2.30.1

func JSONStringExample() error

func JSONStructExample added in v2.30.1

func JSONStructExample() error

func MapInsertRead

func MapInsertRead() error

func MultiHostRandomVersion added in v2.26.0

func MultiHostRandomVersion() error

func MultiHostRoundRobinVersion

func MultiHostRoundRobinVersion() error

func MultiHostVersion

func MultiHostVersion() error

func NestedFlattened

func NestedFlattened() error

func NestedUnFlattened

func NestedUnFlattened() error

func NullableInsertRead

func NullableInsertRead() error

func OpenTelemetry

func OpenTelemetry() error

func PingWithSettings

func PingWithSettings() error

func ProgressProfileLogs

func ProgressProfileLogs() error

func QueryRow

func QueryRow() error

func QueryRows

func QueryRows() error

func QueryWithParameters added in v2.5.0

func QueryWithParameters() error

func ReadWriteBigInt

func ReadWriteBigInt() error

func ReadWriteDecimal

func ReadWriteDecimal() error

func SSLNoVerifyVersion

func SSLNoVerifyVersion() error

func SSLVersion

func SSLVersion() error

func ScanStruct

func ScanStruct() error

func SelectStruct

func SelectStruct() error

func SpecialBind

func SpecialBind() error

func TupleInsertRead

func TupleInsertRead() error

func UUIDInsertRead

func UUIDInsertRead() error

func UseContext

func UseContext() error

func VariantExample added in v2.30.1

func VariantExample() error

Types

type FastProduct added in v2.31.0

type FastProduct struct {
	ID        clickhouse.Dynamic `json:"id"`
	Name      string             `json:"name"`
	Tags      []string           `json:"tags"`
	Pricing   FastProductPricing `json:"pricing"`
	Metadata  map[string]any     `json:"metadata"`
	CreatedAt time.Time          `json:"created_at" chType:"DateTime64(3)"`
}

func NewExampleFastProduct added in v2.31.0

func NewExampleFastProduct() *FastProduct

func (*FastProduct) DeserializeClickHouseJSON added in v2.31.0

func (p *FastProduct) DeserializeClickHouseJSON(obj *clickhouse.JSON) error

DeserializeClickHouseJSON implements clickhouse.JSONDeserializer for faster struct scanning

func (*FastProduct) SerializeClickHouseJSON added in v2.31.0

func (p *FastProduct) SerializeClickHouseJSON() (*clickhouse.JSON, error)

SerializeClickHouseJSON implements clickhouse.JSONSerializer for faster struct appending

type FastProductPricing added in v2.31.0

type FastProductPricing struct {
	Price    int64  `json:",omitempty"`
	Currency string `json:",omitempty"`
}

type Product added in v2.30.1

type Product struct {
	ID        clickhouse.Dynamic     `json:"id"`
	Name      string                 `json:"name"`
	Tags      []string               `json:"tags"`
	Pricing   ProductPricing         `json:"pricing"`
	Metadata  map[string]interface{} `json:"metadata"`
	CreatedAt time.Time              `json:"created_at" chType:"DateTime64(3)"`
}

func NewExampleProduct added in v2.30.1

func NewExampleProduct() *Product

type ProductPricing added in v2.30.1

type ProductPricing struct {
	Price    int64  `json:",omitempty"`
	Currency string `json:",omitempty"`
}

type YourBatch added in v2.13.0

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

func New added in v2.13.0

func New(ctx context.Context, conn driver.Conn, insertStatement string) (*YourBatch, error)

func (*YourBatch) Append added in v2.13.0

func (b *YourBatch) Append(col1 uint64, col2 string) error

func (*YourBatch) Send added in v2.13.0

func (b *YourBatch) Send() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳