clickhouse

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CH *sql.DB
)

Functions

func BeginOperation

func BeginOperation() (tx *sql.Tx, err error)

BeginOperation is an analogue of BeginTransaction from database package. Click House does not supports transactions (in terms of classic ACID transactions of PostgreSQL), so the name of this method has been changed to not confuse developers.

Clickhouse client tries to stay compliant with sql.DB interface, so it must define a Transaction's interface, but this transactions are not ACID.

func DataTableName

func DataTableName() string

func DropTZInfo

func DropTZInfo(t time.Time) string

func EnsureSchema

func EnsureSchema() (err error)

EnsureSchema executes provided schema definition SQL file. By default it ensures all required tables / indexes / constraints / triggers are present. In case if some table (or index, or ...) is absent - it would be recreated. Does not replaces tables in cae if them are present (to not to drop data occasionally).

func Free

func Free()

func Init

func Init() (err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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