clickhouse

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

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

func (*Conn) BulkInsertEx

func (this *Conn) BulkInsertEx(cmd string, nCol int, args []interface{}, szSQLsurfix ...string) error

func (*Conn) Close

func (this *Conn) Close() error

func (*Conn) Context

func (this *Conn) Context() context.Context

func (*Conn) Exec

func (this *Conn) Exec(cmd string, args ...interface{}) error

update delete create table, alter index etc.

func (*Conn) Ping

func (this *Conn) Ping() error

func (*Conn) Query

func (this *Conn) Query(query string, args ...interface{}) (QArray, error)

query database

func (*Conn) QueryCount

func (this *Conn) QueryCount(query string, args ...interface{}) (int64, error)

select count(*) from ...

func (*Conn) Select

func (this *Conn) Select(dest interface{}, query string, args ...interface{}) error

query database

func (*Conn) WithContext

func (this *Conn) WithContext(ctx context.Context) *Conn

type DBServer

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

func New

func New(dataSourceName string, MaxIdleConn int) (*DBServer, error)

func (*DBServer) Close

func (this *DBServer) Close()

func (*DBServer) NewConn

func (this *DBServer) NewConn() *Conn

type QArray

type QArray []QItem

func MakeQArray

func MakeQArray() QArray

func (*QArray) Base64Encode

func (array *QArray) Base64Encode(key ...string) *QArray

func (*QArray) IntToBool

func (array *QArray) IntToBool(key ...string) *QArray

func (*QArray) Shuffle

func (array *QArray) Shuffle() *QArray

func (*QArray) ToFloat64

func (array *QArray) ToFloat64(key ...string) *QArray

func (*QArray) ToInt64

func (array *QArray) ToInt64(key ...string) *QArray

func (*QArray) ToRawArray

func (array *QArray) ToRawArray() []interface{}

type QItem

type QItem map[string]interface{}

func (QItem) AsMap

func (item QItem) AsMap() map[string]interface{}

func (QItem) Base64Encode

func (item QItem) Base64Encode(keys ...string) QItem

func (QItem) GetColumnFloat64

func (item QItem) GetColumnFloat64(key string) float64

func (QItem) GetColumnInt64

func (item QItem) GetColumnInt64(key string) int64

func (QItem) GetColumnString

func (item QItem) GetColumnString(key string) string

func (QItem) IntToBool

func (item QItem) IntToBool(keys ...string) QItem

func (QItem) ToFloat64

func (item QItem) ToFloat64(keys ...string) QItem

func (QItem) ToInt64

func (item QItem) ToInt64(keys ...string) QItem

Jump to

Keyboard shortcuts

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