Versions in this module Expand all Collapse all v0 v0.0.2 Nov 25, 2024 v0.0.1 Nov 25, 2024 Changes in this version + const TypeBytes + const TypeFloat32 + const TypeFloat64 + const TypeInt + const TypeInt16 + const TypeInt32 + const TypeInt64 + const TypeInt8 + const TypeJSON + const TypeString + const TypeTime + const TypeUInt + const TypeUInt16 + const TypeUInt32 + const TypeUInt64 + const TypeUInt8 + var ClickHouseTypeMap = map[string]int8 + var MySQLTypeMap = map[string]int8 + func CountSQL(statement *Statement) (sql string) + func DeleteSQL(statement *Statement) string + func FindSQL(statement *Statement) (sql string) + func GetSQLWithParams(sql string, params []interface{}) string + func InsertSQL(statement *Statement) string + func ReplaceSQL(statement *Statement) string + func SetLocation(l *time.Location) + func UpdateSQL(statement *Statement) string + type Join struct + On map[string]string + Table string + Type string + Using []string + type NullBool struct + Bool bool + IsNull bool + func (ns *NullBool) Scan(value interface{}) error + type NullFloat struct + Float float64 + IsNull bool + func (ns *NullFloat) Scan(value interface{}) error + type NullInt struct + Int int64 + IsNull bool + func (ns *NullInt) Scan(value interface{}) error + type NullString struct + IsNull bool + String string + func (ns *NullString) Scan(value interface{}) error + type NullTime struct + IsNull bool + Time time.Time + TimeLayout string + func (ns *NullTime) Scan(value interface{}) error + type NullUint struct + IsNull bool + Uint uint64 + func (ns *NullUint) Scan(value interface{}) error + type Query struct + Addr *util.DBAddress + Alias string + Column []string + DB *obj.TblDB + Data map[string]interface{} + Datas []map[string]interface{} + From uint64 + Group []string + Having map[string]interface{} + IfNotExists bool + Join []*Join + OP string + Order []string + Page int + Params []interface{} + SQL string + Shard []string + Size int + Table string + TblTable *obj.TblTable + TimeLog *log.TimeLog + TransInfo *obj.TransInfo + Where map[string]interface{} + func (q *Query) Count(ctx context.Context, s *Statement) (uint64, error) + func (q *Query) Find(ctx context.Context, s *Statement, querySQL string, params []interface{}) (result map[string]interface{}, err error) + func (q *Query) FindAll(ctx context.Context, s *Statement, querySQL string, params []interface{}) (result []map[string]interface{}, err error) + func (q *Query) InsertToCK(ctx context.Context, desc string, batch bool, retryTime int, table string, ...) ([]map[string]interface{}, map[int]error, error) + func (q *Query) Query(ctx context.Context) (interface{}, *proto.Detail, bool, error) + func (q *Query) SetParams(req *filter.Request, property *obj.Property, addr *util.DBAddress, ...) error + func (q *Query) Transaction(ctx context.Context, fn func(c *Query) error) error + type Statement struct + func (s *Statement) GetOrder() string + func (s *Statement) GetParams() []interface{} + func (s *Statement) GetWhere() string + func (s *Statement) Group(group []string) *Statement + func (s *Statement) Having(dbType int, having map[string]interface{}) *Statement + func (s *Statement) Join(joins []*Join) *Statement + func (s *Statement) Limit(limit int) *Statement + func (s *Statement) Order(orders []string) *Statement + func (s *Statement) SetColumn(column []string) *Statement + func (s *Statement) SetDBType(typ int) *Statement + func (s *Statement) SetMaps(attributeArr []map[string]interface{}) *Statement + func (s *Statement) SetTable(table, alias string) *Statement + func (s *Statement) UpdateMap(attributes map[string]interface{}) *Statement + func (s *Statement) Where(dbType int, where map[string]interface{}) *Statement