Documentation
¶
Index ¶
- Constants
- type DBClient
- func (t *DBClient) All(result interface{}) ([]map[string]interface{}, error)
- func (t *DBClient) Begin(autoRollback bool) error
- func (t *DBClient) Close()
- func (t *DBClient) Commit() error
- func (t *DBClient) Delete() *DBClient
- func (t *DBClient) Do() (int64, error)
- func (t *DBClient) First(result interface{}) (map[string]interface{}, error)
- func (t *DBClient) Insert(data interface{}) *DBClient
- func (t *DBClient) Limit(limit uint64) *DBClient
- func (t *DBClient) Offset(offset uint64) *DBClient
- func (t *DBClient) OrderBy(col string, asc bool) *DBClient
- func (t *DBClient) RawExec(sql string, args ...any) *DBClient
- func (t *DBClient) RawQuery(sql string, args ...any) *DBClient
- func (t *DBClient) Select(columns []string, distinct bool) *DBClient
- func (t *DBClient) SetConnAndTime(maxOpenConns, maxIdleConns int, maxLifeTime, maxIdleTime time.Duration)
- func (t *DBClient) Table(table string) *DBClient
- func (t *DBClient) Update(data interface{}) *DBClient
- func (t *DBClient) Where(where map[string]interface{}) *DBClient
- type Info
Constants ¶
View Source
const ( DEFAULT = 0 SELECT = 1 UPDATE = 2 INSERT = 3 DELETE = 4 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBClient ¶
func NewDbByConn ¶
func (*DBClient) SetConnAndTime ¶
Click to show internal directories.
Click to hide internal directories.