ck

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDSN

func GetDSN(conf config.ClickHouse) string

func Init

func Init(conf config.ClickHouse) error

func OpenDB

func OpenDB(conf config.ClickHouse) (*sql.DB, error)

Types

type ClickHouse

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

func NewClickHouse

func NewClickHouse() *ClickHouse

func (*ClickHouse) BatchInsert

func (ck *ClickHouse) BatchInsert(batch *ds.Batch) (int64, error)

func (*ClickHouse) Begin

func (ck *ClickHouse) Begin() error

func (*ClickHouse) Commit

func (ck *ClickHouse) Commit() error

func (*ClickHouse) Delete

func (ck *ClickHouse) Delete(del *ds.Delete) (int64, error)

func (*ClickHouse) Exec

func (ck *ClickHouse) Exec(statement string) error

func (*ClickHouse) FetchAll

func (ck *ClickHouse) FetchAll(table string, where map[string]interface{}, t interface{}) ([]interface{}, error)

func (*ClickHouse) FetchAllByWhere added in v0.0.6

func (ck *ClickHouse) FetchAllByWhere(table string, where *ds.Where, t interface{}) ([]interface{}, error)

func (*ClickHouse) FetchPage added in v0.0.6

func (ck *ClickHouse) FetchPage(table string, where map[string]interface{}, t interface{}, page int, pageSize int) ([]interface{}, error)

func (*ClickHouse) FetchPageByWhere added in v0.0.6

func (ck *ClickHouse) FetchPageByWhere(table string, where *ds.Where, t interface{}, page int, pageSize int) ([]interface{}, error)

func (*ClickHouse) FetchRow

func (ck *ClickHouse) FetchRow(table string, where map[string]interface{}, t interface{}) (interface{}, error)

func (*ClickHouse) InTransaction

func (ck *ClickHouse) InTransaction() bool

func (*ClickHouse) Insert

func (ck *ClickHouse) Insert(insert *ds.Insert) (int64, error)

func (*ClickHouse) Query

func (ck *ClickHouse) Query(query string, t interface{}, args ...interface{}) ([]interface{}, error)

func (*ClickHouse) RollBack

func (ck *ClickHouse) RollBack() error

func (*ClickHouse) Select

func (ck *ClickHouse) Select(sel *ds.Select, t interface{}) ([]interface{}, error)

func (*ClickHouse) Update

func (ck *ClickHouse) Update(update *ds.Update) (int64, error)

Jump to

Keyboard shortcuts

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