tests

package
v2.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var JSONTestDate, _ = time.Parse(time.RFC3339, "2024-12-13T02:09:30.123Z")

Functions

func BuildTestJSONPaths

func BuildTestJSONPaths() *chcol.JSON

func CheckMinServerVersion

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

Types

type FastTestStruct

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

FastTestStruct is a distinctly separate type that implements proton.JSONSerializer and proton.JSONDeserializer The struct must be a separate type since the JSON column is unable to ignore the interface implementation.

func BuildFastTestJSONStruct

func BuildFastTestJSONStruct() FastTestStruct

func (*FastTestStruct) DeserializeProtonJSON

func (fts *FastTestStruct) DeserializeProtonJSON(obj *proton.JSON) error

DeserializeProtonJSON implements proton.JSONDeserializer for faster struct scanning

func (*FastTestStruct) SerializeProtonJSON

func (fts *FastTestStruct) SerializeProtonJSON() (*proton.JSON, error)

SerializeProtonJSON implements proton.JSONSerializer for faster struct appending

type TestStruct

type TestStruct struct {
	Name   string
	Age    int64
	Active bool
	Score  float64

	Tags    []string
	Numbers []int64

	Address TestStructAddress

	KeysNumbers map[string]int64
	Metadata    map[string]interface{}

	Timestamp time.Time `chType:"datetime64(3)"`

	DynamicString chcol.Dynamic
	DynamicInt    chcol.Dynamic
	DynamicMap    chcol.Dynamic
}

func BuildTestJSONStruct

func BuildTestJSONStruct() TestStruct

type TestStructAddress

type TestStructAddress struct {
	Street  string `chType:"string"`
	City    string `chType:"string"`
	Country string `chType:"string"`
}

Directories

Path Synopsis
209 command
360 command
470 command
476 command
484 command
485 command
Licensed to ClickHouse, Inc.
Licensed to ClickHouse, Inc.

Jump to

Keyboard shortcuts

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