Documentation ¶
Index ¶
- func InitializationDb(conf *define.DatabaseConf) *sql.DB
- func NewDb(tx *sql.Tx, db *sql.DB) define.Db
- type Db
- func (c *Db) AndWhere(str string, arg ...any) define.Db
- func (c *Db) Args(arg ...any) define.Db
- func (c *Db) ColumnInt64() []int64
- func (c *Db) ColumnString() []string
- func (c *Db) Count() int64
- func (c *Db) Delete() (int64, error)
- func (c *Db) Field(field ...string) define.Db
- func (c *Db) GetDb() *sql.DB
- func (c *Db) GetTx() *sql.Tx
- func (c *Db) GroupBy(groupBy ...string) define.Db
- func (c *Db) InnerJoin(str, on string) define.Db
- func (c *Db) Insert() (int64, error)
- func (c *Db) Join(opt, str, on string) define.Db
- func (c *Db) LeftJoin(str, on string) define.Db
- func (c *Db) OffsetLimit(offset, limit int64) define.Db
- func (c *Db) OrWhere(str string, arg ...any) define.Db
- func (c *Db) OrderBy(orderBy ...string) define.Db
- func (c *Db) Query(rowsFn func(rows *sql.Rows))
- func (c *Db) QueryRow(rowFn func(row *sql.Row))
- func (c *Db) RightJoin(str, on string) define.Db
- func (c *Db) SqlExec(s string, args []any) (sql.Result, error)
- func (c *Db) SqlQuery(s string, args []any, rowsFn func(rows *sql.Rows))
- func (c *Db) SqlQueryRow(s string, args []any, rowFn func(row *sql.Row))
- func (c *Db) Table(name string) define.Db
- func (c *Db) Update() (int64, error)
- func (c *Db) Value(val ...string) define.Db
- func (c *Db) Where(opt string, str string, arg ...any) define.Db
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitializationDb ¶
func InitializationDb(conf *define.DatabaseConf) *sql.DB
InitializationDb 初始化Db
Types ¶
Click to show internal directories.
Click to hide internal directories.