Documentation ¶
Index ¶
- func GetDSN(conf config.ClickHouse) string
- func Init(conf config.ClickHouse) error
- func OpenDB(conf config.ClickHouse) (*sql.DB, error)
- type ClickHouse
- func (ck *ClickHouse) BatchInsert(batch *ds.Batch) (int64, error)
- func (ck *ClickHouse) Begin() error
- func (ck *ClickHouse) Commit() error
- func (ck *ClickHouse) Delete(del *ds.Delete) (int64, error)
- func (ck *ClickHouse) Exec(statement string) error
- func (ck *ClickHouse) FetchAll(table string, where map[string]interface{}, t interface{}) ([]interface{}, error)
- func (ck *ClickHouse) FetchAllByWhere(table string, where *ds.Where, t interface{}) ([]interface{}, error)
- func (ck *ClickHouse) FetchPage(table string, where map[string]interface{}, t interface{}, page int, ...) ([]interface{}, error)
- func (ck *ClickHouse) FetchPageByWhere(table string, where *ds.Where, t interface{}, page int, pageSize int) ([]interface{}, error)
- func (ck *ClickHouse) FetchRow(table string, where map[string]interface{}, t interface{}) (interface{}, error)
- func (ck *ClickHouse) InTransaction() bool
- func (ck *ClickHouse) Insert(insert *ds.Insert) (int64, error)
- func (ck *ClickHouse) Query(query string, t interface{}, args ...interface{}) ([]interface{}, error)
- func (ck *ClickHouse) RollBack() error
- func (ck *ClickHouse) Select(sel *ds.Select, t interface{}) ([]interface{}, error)
- func (ck *ClickHouse) Update(update *ds.Update) (int64, error)
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
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) 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) FetchPageByWhere ¶ added in v0.0.6
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) Query ¶
func (ck *ClickHouse) Query(query string, t interface{}, args ...interface{}) ([]interface{}, error)
func (*ClickHouse) RollBack ¶
func (ck *ClickHouse) RollBack() error
Click to show internal directories.
Click to hide internal directories.