Documentation ¶
Index ¶
Constants ¶
View Source
const DriverName = "vsql"
Variables ¶
This section is empty.
Functions ¶
func RegisterDB ¶
Types ¶
type ColumnType ¶
type ColumnType interface { DatabaseTypeName() string DecimalSize() (precision, scale int64, ok bool) Length() (length int64, ok bool) Name() string Nullable() (nullable, ok bool) ScanType() reflect.Type }
ColumnType interface off sql.ColumnType
type Conn ¶
type Conn interface { BeginTx(ctx context.Context, opts *sql.TxOptions) (Tx, error) Close() error ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error) PingContext(ctx context.Context) error PrepareContext(ctx context.Context, query string) (Stmt, error) QueryContext(ctx context.Context, query string, args ...any) (Rows, error) QueryRowContext(ctx context.Context, query string, args ...any) Row Raw(f func(driverConn any) error) (err error) }
Conn interface off sql.Conn
type DB ¶
type DB interface { Begin() (Tx, error) BeginTx(ctx context.Context, opts *sql.TxOptions) (Tx, error) Close() error Conn(ctx context.Context) (Conn, error) Driver() driver.Driver Exec(query string, args ...any) (sql.Result, error) ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error) Ping() error PingContext(ctx context.Context) error Prepare(query string) (Stmt, error) PrepareContext(ctx context.Context, query string) (Stmt, error) Query(query string, args ...any) (Rows, error) QueryContext(ctx context.Context, query string, args ...any) (Rows, error) QueryRow(query string, args ...any) Row QueryRowContext(ctx context.Context, query string, args ...any) Row SetConnMaxIdleTime(d time.Duration) SetConnMaxLifetime(d time.Duration) SetMaxIdleConns(n int) SetMaxOpenConns(n int) Stats() sql.DBStats }
DB interface off sql.DB
type DBOnlyCtx ¶
type DBOnlyCtx interface { BeginTx(ctx context.Context, opts *sql.TxOptions) (Tx, error) PrepareContext(ctx context.Context, query string) (Stmt, error) QueryContext(ctx context.Context, query string, args ...any) (Rows, error) ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error) PingContext(ctx context.Context) error Close() error }
func NewDBOnlyCtx ¶
func NewDBOnlyCtx(raw DBRawOnlyCtx) DBOnlyCtx
type DBRawOnlyCtx ¶
type DBRawOnlyCtx interface { BeginTx(ctx context.Context, opts *sql.TxOptions) (*sql.Tx, error) PrepareContext(ctx context.Context, query string) (*sql.Stmt, error) QueryContext(ctx context.Context, query string, args ...any) (*sql.Rows, error) ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error) PingContext(ctx context.Context) error Close() error }
type Rows ¶
type Rows interface { Close() error ColumnTypes() ([]ColumnType, error) Columns() ([]string, error) Err() error Next() bool NextResultSet() bool Scan(dest ...any) error }
Rows interface off sql.Rows
type Stmt ¶
type Stmt interface { Close() error Exec(args ...any) (sql.Result, error) ExecContext(ctx context.Context, args ...any) (sql.Result, error) Query(args ...any) (Rows, error) QueryContext(ctx context.Context, args ...any) (Rows, error) QueryRow(args ...any) Row QueryRowContext(ctx context.Context, args ...any) Row }
Stmt interface off sql.Stmt
type Tx ¶
type Tx interface { Commit() error Exec(query string, args ...any) (sql.Result, error) ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error) Prepare(query string) (Stmt, error) PrepareContext(ctx context.Context, query string) (Stmt, error) Query(query string, args ...any) (Rows, error) QueryContext(ctx context.Context, query string, args ...any) (Rows, error) QueryRow(query string, args ...any) Row QueryRowContext(ctx context.Context, query string, args ...any) Row Rollback() error Stmt(stmt Stmt) Stmt StmtContext(ctx context.Context, stmt Stmt) Stmt }
Tx interface off sql.Tx
Click to show internal directories.
Click to hide internal directories.