Documentation ¶
Index ¶
- type DB
- type Stmt
- func (s *Stmt) Count() (int64, error)
- func (s *Stmt) Exec(query string, args ...interface{}) (int64, error)
- func (s *Stmt) Group(group string) *Stmt
- func (s *Stmt) Insert(data interface{}) (int64, error)
- func (s *Stmt) Limit(limit int) *Stmt
- func (s *Stmt) Offset(offset int) *Stmt
- func (s *Stmt) Order(order string) *Stmt
- func (s *Stmt) Query(result interface{}) error
- func (s *Stmt) SQLColumn(rt reflect.Type, table string) string
- func (s *Stmt) SQLCondition(bs *bytes.Buffer) *bytes.Buffer
- func (s *Stmt) SQLCount() string
- func (s *Stmt) SQLInsert(rt reflect.Type, rv reflect.Value) (sql string, refs []interface{})
- func (s *Stmt) SQLQuery(rt reflect.Type) string
- func (s *Stmt) SQLQueryBuilder(result interface{}) (string, error)
- func (s *Stmt) SQLUpdate(rt reflect.Type, rv reflect.Value) (sql string, refs []interface{})
- func (s *Stmt) Sort(sort string) *Stmt
- func (s *Stmt) Update(data interface{}) (int64, error)
- func (s *Stmt) Where(f string, args ...interface{}) *Stmt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct { IP string Port int DBName string UserName string Passwd string Charset string TimeOut int }
DB db instance.
type Stmt ¶
type Stmt struct {
// contains filtered or unexported fields
}
Stmt db stmt.
func (*Stmt) SQLCondition ¶
SQLCondition where, order, limit
func (*Stmt) SQLQueryBuilder ¶
SQLQueryBuilder build sql query.
Click to show internal directories.
Click to hide internal directories.