Documentation ¶
Index ¶
- func ConnectToDB(user, password, host, port, name string, maxOpen, maxIdle int, ...) *sqlx.DB
- func RunInTransaction(ctx context.Context, fn func(ctx context.Context) error) error
- type Gosl_Key
- type Key
- type Kit
- type Queryable
- func (qtx *Queryable) BindNamed(query string, arg interface{}) (string, []interface{}, error)
- func (qtx *Queryable) DB() *sqlx.DB
- func (qtx *Queryable) DriverName() string
- func (qtx *Queryable) Exec(query string, args ...interface{}) (_sql.Result, error)
- func (qtx *Queryable) ExecContext(ctx context.Context, query string, args ...interface{}) (_sql.Result, error)
- func (qtx *Queryable) Get(dest interface{}, query string, args ...interface{}) error
- func (qtx *Queryable) GetContext(ctx context.Context, dest interface{}, query string, args ...interface{}) error
- func (qtx *Queryable) Key() interface{}
- func (qtx *Queryable) MustExec(query string, args ...interface{}) _sql.Result
- func (qtx *Queryable) MustExecContext(ctx context.Context, query string, args ...interface{}) _sql.Result
- func (qtx *Queryable) NamedExec(query string, arg interface{}) (_sql.Result, error)
- func (qtx *Queryable) NamedExecContext(ctx context.Context, query string, arg interface{}) (_sql.Result, error)
- func (qtx *Queryable) NamedQuery(query string, arg interface{}) (*sqlx.Rows, error)
- func (qtx *Queryable) NamedQueryRowx(query string, args interface{}) (*sqlx.Row, error)
- func (qtx *Queryable) NamedQueryRowxContext(ctx context.Context, query string, args interface{}) (*sqlx.Row, error)
- func (qtx *Queryable) PrepareNamed(query string) (*sqlx.NamedStmt, error)
- func (qtx *Queryable) PrepareNamedContext(ctx context.Context, query string) (*sqlx.NamedStmt, error)
- func (qtx *Queryable) Preparex(query string) (*sqlx.Stmt, error)
- func (qtx *Queryable) PreparexContext(ctx context.Context, query string) (*sqlx.Stmt, error)
- func (qtx *Queryable) QueryRowx(query string, args ...interface{}) *sqlx.Row
- func (qtx *Queryable) QueryRowxContext(ctx context.Context, query string, args ...interface{}) *sqlx.Row
- func (qtx *Queryable) Queryx(query string, args ...interface{}) (*sqlx.Rows, error)
- func (qtx *Queryable) QueryxContext(ctx context.Context, query string, args ...interface{}) (*sqlx.Rows, error)
- func (qtx *Queryable) Rebind(query string) string
- func (qtx *Queryable) Select(dest interface{}, query string, args ...interface{}) error
- func (qtx *Queryable) SelectContext(ctx context.Context, dest interface{}, query string, args ...interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Gosl_Key ¶ added in v0.0.19
type Gosl_Key int
const CACHE_SQL_KEY Gosl_Key = 1988
const SQL_KEY Gosl_Key = 1977
const SYSTEM_STACK Gosl_Key = 101
type Kit ¶ added in v0.0.19
type Queryable ¶
type Queryable struct {
// contains filtered or unexported fields
}
func NewQueryable ¶
func NewQueryable(db interface{}) *Queryable
func (*Queryable) ExecContext ¶
func (qtx *Queryable) ExecContext(ctx context.Context, query string, args ...interface{}) (_sql.Result, error)
ExecContext ...
func (*Queryable) GetContext ¶
func (qtx *Queryable) GetContext(ctx context.Context, dest interface{}, query string, args ...interface{}) error
GetContext ...
func (*Queryable) MustExecContext ¶
func (qtx *Queryable) MustExecContext(ctx context.Context, query string, args ...interface{}) _sql.Result
MustExecContext ...
func (*Queryable) NamedExecContext ¶
func (qtx *Queryable) NamedExecContext(ctx context.Context, query string, arg interface{}) (_sql.Result, error)
NamedExecContext ...
func (*Queryable) NamedQuery ¶
NamedQuery ...
func (*Queryable) NamedQueryRowx ¶
NamedQueryRowx run BindNamed then QueryRowx
func (*Queryable) NamedQueryRowxContext ¶
func (qtx *Queryable) NamedQueryRowxContext(ctx context.Context, query string, args interface{}) (*sqlx.Row, error)
NamedQueryRowxContext run BindNamed then QueryRowxContext
func (*Queryable) PrepareNamed ¶
PrepareNamed ...
func (*Queryable) PrepareNamedContext ¶
func (qtx *Queryable) PrepareNamedContext(ctx context.Context, query string) (*sqlx.NamedStmt, error)
PrepareNamedContext ...
func (*Queryable) PreparexContext ¶
PreparexContext ...
func (*Queryable) QueryRowxContext ¶
func (qtx *Queryable) QueryRowxContext(ctx context.Context, query string, args ...interface{}) *sqlx.Row
QueryRowxContext ...
func (*Queryable) QueryxContext ¶
func (qtx *Queryable) QueryxContext(ctx context.Context, query string, args ...interface{}) (*sqlx.Rows, error)
QueryxContext ...
Click to show internal directories.
Click to hide internal directories.