Documentation
¶
Index ¶
- type Session
- func (s *Session) Begin() error
- func (s *Session) Commit() error
- func (s *Session) Exec(query string, args ...interface{}) (sql.Result, error)
- func (s *Session) Prepare(query string) (*sql.Stmt, error)
- func (s *Session) Query(query string, args ...interface{}) (*sql.Rows, error)
- func (s *Session) QueryRow(query string, args ...interface{}) *sql.Row
- func (s *Session) Rollback() error
- type SessionFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Session ¶
Session 会话
type SessionFactory ¶
SessionFactory 会话工厂
func NewSessionFactory ¶
func NewSessionFactory(driverName, dataSourseName string) (*SessionFactory, error)
NewSessionFactory 创建一个会话工厂
func (*SessionFactory) GetSession ¶
func (sf *SessionFactory) GetSession() *Session
GetSession 获取一个Session
Click to show internal directories.
Click to hide internal directories.