Documentation ¶
Index ¶
- func Delete(table string, condition condition.Condition) (sql string, args []any)
- func Flag2Generator(f *basis.Flag) (basis.Generator, error)
- func Insert(table string, columns basis.Columns, rows []basis.Row, ignore bool) (sql string, args []any)
- func Replace(table string, columns basis.Columns, rows []basis.Row) (sql string, args []any)
- func Update(table, setters string, condition condition.Condition) (sql string, args []any)
- type Db
- type Options
- type Query
- func (q *Query) Avg(field string) (sql string, args []any)
- func (q *Query) Close()
- func (q *Query) Count(field string) (sql string, args []any)
- func (q *Query) From(table string) basis.Query
- func (q *Query) Group(fields ...string) basis.Query
- func (q *Query) HasFrom() bool
- func (q *Query) Having(having string) basis.Query
- func (q *Query) Limit(limit int64) basis.Query
- func (q *Query) Max(field string) (sql string, args []any)
- func (q *Query) Min(field string) (sql string, args []any)
- func (q *Query) Offset(offset int64) basis.Query
- func (q *Query) Order(orders ...string) basis.Query
- func (q *Query) Select(columns ...string) basis.Query
- func (q *Query) Sql() (sql string, args []any)
- func (q *Query) Sum(field string) (sql string, args []any)
- func (q *Query) Where(condition condition.Condition) basis.Query
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct { DbName string `json:"dbName" yaml:"dbName"` Host string `json:"host" yaml:"host"` Port uint32 `json:"port" yaml:"port"` UserName string `json:"userName" yaml:"userName"` Password string `json:"password" yaml:"password"` CharSet string `json:"charSet" yaml:"charSet"` MaxIdleConns int `json:"maxIdleConns" yaml:"maxIdleConns"` MaxOpenConns int `json:"maxOpenConns" yaml:"maxOpenConns"` ConnMaxIdleTimeSecond int64 `json:"connMaxIdleTimeSecond" yaml:"connMaxIdleTimeSecond"` ConnMaxLifetimeSecond int64 `json:"connMaxLifetimeSecond" yaml:"connMaxLifetimeSecond"` }
func DefaultMysqlOption ¶
func DefaultMysqlOption() Options
func Flag2Options ¶
func OptionsWithJson ¶
func OptionsWithYaml ¶
func (*Options) ConnMaxIdleTime ¶
func (*Options) ConnMaxLifetime ¶
Click to show internal directories.
Click to hide internal directories.