Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DB ¶
type DB interface { // sqlx的方法 BindNamed(query string, arg interface{}) (string, []interface{}, error) DriverName() string Get(dest interface{}, query string, args ...interface{}) error GetContext(ctx context.Context, dest interface{}, query string, args ...interface{}) error MustExec(query string, args ...interface{}) sql.Result MustExecContext(ctx context.Context, query string, args ...interface{}) sql.Result NamedExec(query string, arg interface{}) (sql.Result, error) NamedExecContext(ctx context.Context, query string, arg interface{}) (sql.Result, error) NamedQuery(query string, arg interface{}) (*sqlx.Rows, error) PrepareNamed(query string) (*sqlx.NamedStmt, error) PrepareNamedContext(ctx context.Context, query string) (*sqlx.NamedStmt, error) Preparex(query string) (*sqlx.Stmt, error) PreparexContext(ctx context.Context, query string) (*sqlx.Stmt, error) QueryRowx(query string, args ...interface{}) *sqlx.Row QueryRowxContext(ctx context.Context, query string, args ...interface{}) *sqlx.Row Queryx(query string, args ...interface{}) (*sqlx.Rows, error) QueryxContext(ctx context.Context, query string, args ...interface{}) (*sqlx.Rows, error) Rebind(query string) string Select(dest interface{}, query string, args ...interface{}) error SelectContext(ctx context.Context, dest interface{}, query string, args ...interface{}) error // database/sql的方法 QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error) }
DB 接口
Click to show internal directories.
Click to hide internal directories.