Documentation ¶
Overview ¶
Package sql provides utilities for working with package database/sql.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB interface { ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error) PrepareContext(ctx context.Context, query string) (*sql.Stmt, error) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error) }
DB is a minimal interface that is implemented by both *sql.DB and *sql.Tx.
type Dialect ¶
type Dialect interface { BuildSelect(columns ...string) string BuildInsert(columns ...string) string BuildUpdate(columns ...string) string BuildPlaceholders(start, end int) string }
var MySQL Dialect = mySQL{}
MySQL is the MySQL dialect.
var PostgreSQL Dialect = postgreSQL{}
PostgreSQL is the PostgreSQL dialect.
type Row ¶
type Row interface {
Scan(dest ...interface{}) error
}
Row is a minimal interface around *sql.Row.
Click to show internal directories.
Click to hide internal directories.