Documentation
¶
Overview ¶
Package sqldriver adapts any database/sql connection to driver.Driver. It backs the libSQL/Turso driver and the public WithSQLDB option, which lets a caller supply a driver drel does not depend on.
Index ¶
- func ApplyPoolConfig(db *sql.DB, pc ...driver.PoolConfig)
- type Driver
- func (d *Driver) Begin(ctx context.Context) (driver.Tx, error)
- func (d *Driver) BeginTx(ctx context.Context, opts driver.TxOptions) (driver.Tx, error)
- func (d *Driver) Close()
- func (d *Driver) DB() *sql.DB
- func (d *Driver) Exec(ctx context.Context, query string, args ...any) (int64, error)
- func (d *Driver) Ping(ctx context.Context) error
- func (d *Driver) Query(ctx context.Context, query string, args ...any) (driver.Rows, error)
- func (d *Driver) QueryRow(ctx context.Context, query string, args ...any) driver.Row
- func (d *Driver) Stat() driver.PoolStat
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyPoolConfig ¶
func ApplyPoolConfig(db *sql.DB, pc ...driver.PoolConfig)
ApplyPoolConfig applies the non-zero pool settings to the handle.
Types ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver implements driver.Driver over a database/sql handle.
func (*Driver) BeginTx ¶
BeginTx starts a transaction. An SQLite-compatible database supports only SERIALIZABLE isolation, so the requested level is ignored; the ReadOnly flag is forwarded.
Click to show internal directories.
Click to hide internal directories.