Documentation
¶
Index ¶
- type BaseDbProvider
- type SqDbClient
- func (b *SqDbClient) HCount() (int64, error)
- func (b *SqDbClient) HGet(v any) error
- func (b *SqDbClient) HQuery(args ...*protobuf.ListParam) (*sqlx.Rows, error)
- func (b *SqDbClient) HSelect(v any, args ...*protobuf.ListParam) error
- func (b *SqDbClient) Sq(builder squirrel.Sqlizer) types.DbClient
- func (b *SqDbClient) Sqrl(builder sqrl.Sqlizer) types.DbClient
- func (b *SqDbClient) ToSql() (string, []any, error)
- type SqrlDbClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseDbProvider ¶
type BaseDbProvider struct {
Default *SqDbClient // 缺省的数据库连接
Main *SqDbClient // 主数据库连接,可读写
Slaves []*SqDbClient // 只读从数据库列表,只可读
Items map[string]*SqDbClient // 额外数据库
}
func (*BaseDbProvider) Master ¶
func (b *BaseDbProvider) Master() types.DbClient
func (*BaseDbProvider) My ¶
func (b *BaseDbProvider) My() types.DbClient
type SqDbClient ¶ added in v1.0.63
func (*SqDbClient) HCount ¶ added in v1.0.63
func (b *SqDbClient) HCount() (int64, error)
func (*SqDbClient) HGet ¶ added in v1.0.63
func (b *SqDbClient) HGet(v any) error
func (*SqDbClient) HSelect ¶ added in v1.0.63
func (b *SqDbClient) HSelect(v any, args ...*protobuf.ListParam) error
func (*SqDbClient) Sq ¶ added in v1.0.63
func (b *SqDbClient) Sq(builder squirrel.Sqlizer) types.DbClient
type SqrlDbClient ¶ added in v1.0.63
func (*SqrlDbClient) HCount ¶ added in v1.0.63
func (b *SqrlDbClient) HCount() (int64, error)
func (*SqrlDbClient) HGet ¶ added in v1.0.63
func (b *SqrlDbClient) HGet(v any) error
Directories
¶
| Path | Synopsis |
|---|---|
|
Package mysql @Title log capability of zerolog @Description zerolog implementation of log capability @Author Ryan Fan 2021-06-09 @Update Ryan Fan 2021-06-09
|
Package mysql @Title log capability of zerolog @Description zerolog implementation of log capability @Author Ryan Fan 2021-06-09 @Update Ryan Fan 2021-06-09 |
Click to show internal directories.
Click to hide internal directories.