Documentation ¶
Index ¶
- type Builder
- type CondAdder
- type CreateTableStatement
- type DB
- func (db *DB) Columns(t string) []string
- func (db *DB) Count(t string) int
- func (db *DB) CreateStatement(t string) CreateTableStatement
- func (db *DB) Drop(t string) bool
- func (db *DB) Exist(t string) bool
- func (db *DB) Rename(s, t string) bool
- func (db *DB) Run(q string, arg map[string]any) int64
- func (db *DB) Tables(p string) []string
- type DBColumn
- type DBConfig
- type DqlBuilder
- func (b *DqlBuilder) AddColumn(c ...string)
- func (b *DqlBuilder) AddCond(k string, op string, v any)
- func (b *DqlBuilder) AddGroup(g ...string)
- func (b *DqlBuilder) AddHaving(h ...string)
- func (b *DqlBuilder) AddJoin(j string)
- func (b *DqlBuilder) AddOrder(k string, o string)
- func (b *DqlBuilder) Build() (string, DqlBuilderArg)
- func (b *DqlBuilder) Limit(l int)
- func (b *DqlBuilder) Named(n bool)
- func (b *DqlBuilder) Offset(o int)
- func (b *DqlBuilder) Table(t string)
- type DqlBuilderArg
- type MysqlDB
- type QueryBuilder
- type Setter
- type TableSetter
- type Updater
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateTableStatement ¶
type DB ¶
func (*DB) CreateStatement ¶
func (db *DB) CreateStatement(t string) CreateTableStatement
type DqlBuilder ¶
type DqlBuilder struct {
// contains filtered or unexported fields
}
func NewDqlBuilder ¶
func NewDqlBuilder() *DqlBuilder
func (*DqlBuilder) AddColumn ¶
func (b *DqlBuilder) AddColumn(c ...string)
func (*DqlBuilder) AddGroup ¶
func (b *DqlBuilder) AddGroup(g ...string)
func (*DqlBuilder) AddHaving ¶
func (b *DqlBuilder) AddHaving(h ...string)
func (*DqlBuilder) AddJoin ¶
func (b *DqlBuilder) AddJoin(j string)
func (*DqlBuilder) AddOrder ¶
func (b *DqlBuilder) AddOrder(k string, o string)
func (*DqlBuilder) Build ¶
func (b *DqlBuilder) Build() (string, DqlBuilderArg)
func (*DqlBuilder) Limit ¶
func (b *DqlBuilder) Limit(l int)
func (*DqlBuilder) Named ¶
func (b *DqlBuilder) Named(n bool)
func (*DqlBuilder) Offset ¶
func (b *DqlBuilder) Offset(o int)
func (*DqlBuilder) Table ¶
func (b *DqlBuilder) Table(t string)
type DqlBuilderArg ¶
type DqlBuilderArg struct {
// contains filtered or unexported fields
}
type QueryBuilder ¶
type QueryBuilder interface { TableSetter CondAdder Setter Updater Builder }
func NewQueryBuilder ¶
func NewQueryBuilder(op string) QueryBuilder
type TableSetter ¶
type TableSetter interface {
Table(t string)
}
Click to show internal directories.
Click to hide internal directories.