Documentation
¶
Overview ¶
* @Date: 2022-11-30 16:05:41 * @LastEditors: fuzhuang * @LastEditTime: 2023-12-11 09:32:42 * @FilePath: \golib\ck\ck_db.go * @Description:
* @Author: Wangjun * @Date: 2021-07-12 16:25:12 * @LastEditTime: 2023-07-14 13:50:51 * @LastEditors: Wangjun * @Description:clickhouse group组 * @FilePath: \sourcedatad:\go\src\gitee.com\haodreams\golib\ck\ck_group.go * hnxr
Index ¶
- type CKGroup
- func (m *CKGroup) Find(dbIdx int, dest interface{}, conds ...interface{}) (err error)
- func (m *CKGroup) GetDB() *gorm.DB
- func (m *CKGroup) RawFind(dbIdx int, dest interface{}, sql string, values ...interface{}) (err error)
- func (m *CKGroup) RawScan(dbIdx int, dest interface{}, sql string, values ...interface{}) (err error)
- type CKGroups
- func (m *CKGroups) Exec(sql string) (err error)
- func (m *CKGroups) Find(dest interface{}, conds ...interface{}) (err error)
- func (m *CKGroups) GetDB() (db *gorm.DB)
- func (m *CKGroups) GetGroupCount() int
- func (m *CKGroups) Init(conf config.Configer) (err error)
- func (m *CKGroups) InitArray(data []string) (ck *CKGroups, err error)
- func (m *CKGroups) Insert(sql string, rows [][]interface{}) (count int, validGroup int64, err error)
- func (m *CKGroups) InsertNoEnable(sql string, rows [][]interface{}) (count int, validGroup int64, err error)
- func (m *CKGroups) InsertObjects(rows interface{}) (count int, validGroup int64, err error)
- func (m *CKGroups) InsertObjectsNoEnable(rows interface{}) (count int, validGroup int64, err error)
- func (m *CKGroups) RawFind(dest interface{}, sql string, values ...interface{}) (err error)
- func (m *CKGroups) RawScan(dest interface{}, sql string, values ...interface{}) (err error)
- func (m *CKGroups) Setup(conf config.Configer) (err error)
- type DB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CKGroup ¶
type CKGroup struct {
// contains filtered or unexported fields
}
type CKGroups ¶
type CKGroups struct { Num int //group 分库数 // contains filtered or unexported fields }
func (*CKGroups) Find ¶
*
- @description: 查找全部
- @param {interface{}} dest 数组地址
- @param {...interface{}} conds
- @return {*}
func (*CKGroups) Init ¶
*
- @description: host11,host12;host21,host22 ,group用分号分隔,host用逗号分隔
- @param {config.Configer} conf
- @return {*}
func (*CKGroups) InitArray ¶
*
- @description: host11,host12;host21,host22 ,group用分号分隔,host用逗号分隔
- @param {config.Configer} conf
- @return {*}
func (*CKGroups) Insert ¶
func (m *CKGroups) Insert(sql string, rows [][]interface{}) (count int, validGroup int64, err error)
*
- @description: 并发写入clickhouse数据
- @param {interface{}} rows 对象数组
- @return {*}
func (*CKGroups) InsertNoEnable ¶
func (m *CKGroups) InsertNoEnable(sql string, rows [][]interface{}) (count int, validGroup int64, err error)
*
- @description: 并发写入clickhouse数据
- @param {interface{}} rows 对象数组
- 不判断enable
- @return {*}
func (*CKGroups) InsertObjects ¶
*公用方法-写入clickhouse数据库 *param(clickhouse连接,json数组) *return(变化行数,错误信息)
func (*CKGroups) InsertObjectsNoEnable ¶
*公用方法-写入clickhouse数据库 *不判断enable *param(clickhouse连接,json数组) *return(变化行数,错误信息)
func (*CKGroups) RawFind ¶
*
- @description: 使用原生sql 查找全部
- @param {interface{}} dest
- @param {string} sql
- @param {...interface{}} values
- @return {*}
Click to show internal directories.
Click to hide internal directories.