Documentation ¶
Index ¶
- type BaseDbClient
- func (b *BaseDbClient) Db() *sqlx.DB
- func (b *BaseDbClient) Sq(builder squirrel.Sqlizer) types.DbClient
- func (b *BaseDbClient) Sqrl(builder sqrl.Sqlizer) types.DbClient
- func (b *BaseDbClient) ToSql() (string, []any, error)
- func (b *BaseDbClient) XCount() (int64, error)
- func (b *BaseDbClient) XGet(v any) error
- func (b *BaseDbClient) XQuery(args ...*protobuf.ListParam) (*sqlx.Rows, error)
- func (b *BaseDbClient) XSelect(v any, args ...*protobuf.ListParam) error
- type BaseDbProvider
- type SqrlClient
- type SqurrelClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseDbClient ¶ added in v1.0.58
func (*BaseDbClient) Db ¶ added in v1.0.64
func (b *BaseDbClient) Db() *sqlx.DB
func (*BaseDbClient) Sq ¶ added in v1.0.58
func (b *BaseDbClient) Sq(builder squirrel.Sqlizer) types.DbClient
func (*BaseDbClient) Sqrl ¶ added in v1.0.64
func (b *BaseDbClient) Sqrl(builder sqrl.Sqlizer) types.DbClient
func (*BaseDbClient) XCount ¶ added in v1.0.64
func (b *BaseDbClient) XCount() (int64, error)
func (*BaseDbClient) XGet ¶ added in v1.0.64
func (b *BaseDbClient) XGet(v any) error
type BaseDbProvider ¶
type BaseDbProvider struct { Default types.DbClient // 缺省的数据库连接 Main types.DbClient // 主数据库连接,可读写 Slaves []types.DbClient // 只读从数据库列表,只可读 Items map[string]types.DbClient // 额外数据库 }
func (*BaseDbProvider) Master ¶
func (b *BaseDbProvider) Master() types.DbClient
func (*BaseDbProvider) My ¶
func (b *BaseDbProvider) My() types.DbClient
type SqrlClient ¶ added in v1.0.64
type SqrlClient struct { *BaseDbClient // contains filtered or unexported fields }
func (*SqrlClient) XCount ¶ added in v1.0.64
func (b *SqrlClient) XCount() (int64, error)
func (*SqrlClient) XGet ¶ added in v1.0.64
func (b *SqrlClient) XGet(v any) error
type SqurrelClient ¶ added in v1.0.64
type SqurrelClient struct { *BaseDbClient // contains filtered or unexported fields }
func (*SqurrelClient) ToSql ¶ added in v1.0.64
func (b *SqurrelClient) ToSql() (string, []any, error)
func (*SqurrelClient) XCount ¶ added in v1.0.64
func (b *SqurrelClient) XCount() (int64, error)
func (*SqurrelClient) XGet ¶ added in v1.0.64
func (b *SqurrelClient) XGet(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.