Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnPool ¶
type ConnPool interface {
io.Closer
QueryExec
Transacter
}
ConnPool represents a connection pool interface.
func NewConnPool ¶ added in v0.3.9
func NewConnPool(db *sql.DB, options *driver.SqlOptions) ConnPool
NewConnPool create ConnPool based on sql.DB
type ExecResult ¶
ExecResult represents the result of a SQL execution.
type QueryExec ¶
type QueryExec interface {
Exec(ctx context.Context, sql string, args ...any) (ExecResult, error)
Query(ctx context.Context, sql string, args ...any) (Rows, error)
QueryRow(ctx context.Context, sql string, args ...any) Row
SqlOptions() *driver.SqlOptions
}
QueryExec defines an interface for executing SQL commands and queries.
type Row ¶
Row provides an abstraction for a single database query result row. Scan maps the row result into the provided destination variables.
type Rows ¶
type Rows interface {
Close()
Rows() iter.Seq2[int, Scanner]
Columns() ([]string, error)
Err() error
}
Rows represents a result set obtained from a database query.
Click to show internal directories.
Click to hide internal directories.