Documentation ¶
Index ¶
- Constants
- type CommonDB
- type Session
- func (s *Session) Begin() (err error)
- func (s *Session) CallMethod(method string, value interface{})
- func (s *Session) Clear()
- func (s *Session) Commit() (err error)
- func (s *Session) Count() (int64, error)
- func (s *Session) CreateTable() error
- func (s *Session) DB() CommonDB
- func (s *Session) Delete() (int64, error)
- func (s *Session) DropTable() error
- func (s *Session) Exec() (result sql.Result, err error)
- func (s *Session) HasTable() bool
- func (s *Session) Insert(values ...interface{}) (int64, error)
- func (s *Session) Limit(num int) *Session
- func (s *Session) Model(value interface{}) *Session
- func (s *Session) OrderBy(desc string) *Session
- func (s *Session) QueryRow() *sql.Row
- func (s *Session) QueryRows() (rows *sql.Rows, err error)
- func (s *Session) Raw(sql string, values ...interface{}) *Session
- func (s *Session) RefTable() *schema.Schema
- func (s *Session) Rollback() (err error)
- func (s *Session) Select(values interface{}) error
- func (s *Session) SelectOne(value interface{}) error
- func (s *Session) Update(kv ...interface{}) (int64, error)
- func (s *Session) Where(desc string, args ...interface{}) *Session
Constants ¶
View Source
const ( BeforeQuery = "BeforeQuery" AfterQuery = "AfterQuery" BeforeUpdate = "BeforeUpdate" AfterUpdate = "AfterUpdate" BeforeDelete = "BeforeDelete" AfterDelete = "AfterDelete" BeforeInsert = "BeforeInsert" AfterInsert = "AfterInsert" )
Hooks constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
和数据库交互的session对象
func (*Session) CallMethod ¶
invoker 方法,类似于java的 动态代理
Click to show internal directories.
Click to hide internal directories.