Documentation ¶
Index ¶
- type Session
- func (s *Session) Clear()
- func (s *Session) CreateTable() error
- func (s *Session) DB() *sql.DB
- func (s *Session) DropTable() error
- func (s *Session) Exec() (result sql.Result, err error)
- func (s *Session) ExecContext(ctx context.Context) (result sql.Result, err error)
- func (s *Session) HasTable() bool
- func (s *Session) Model(value interface{}) *Session
- func (s *Session) Query() (result *sql.Rows, err error)
- func (s *Session) QueryContext(ctx context.Context) (result *sql.Rows, err error)
- func (s *Session) QueryRow() *sql.Row
- func (s *Session) QueryRowContext(ctx context.Context) *sql.Row
- func (s *Session) Raw(sql string, args ...interface{}) *Session
- func (s *Session) RefTable() *schema.Schema
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session struct holds the database connection and the SQL query to be executed.
func (*Session) Clear ¶
func (s *Session) Clear()
Clear resets the SQL query and its arguments in the Session.
func (*Session) CreateTable ¶
func (*Session) ExecContext ¶
ExecContext executes the SQL query in the Session with a context and returns the result.
func (*Session) QueryContext ¶
QueryContext executes the SQL query in the Session with a context and returns the rows.
func (*Session) QueryRow ¶
QueryRow executes the SQL query in the Session and returns the first row.
func (*Session) QueryRowContext ¶
QueryRowContext executes the SQL query in the Session with a context and returns the first row.
Click to show internal directories.
Click to hide internal directories.