Documentation
¶
Index ¶
- type SQLiteDriver
- func (d *SQLiteDriver) Begin(ctx context.Context) (driver.Tx, error)
- func (d *SQLiteDriver) BeginTx(ctx context.Context, opts driver.TxOptions) (driver.Tx, error)
- func (d *SQLiteDriver) Close()
- func (d *SQLiteDriver) Exec(ctx context.Context, query string, args ...any) (int64, error)
- func (d *SQLiteDriver) Query(ctx context.Context, query string, args ...any) (driver.Rows, error)
- func (d *SQLiteDriver) QueryRow(ctx context.Context, query string, args ...any) driver.Row
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SQLiteDriver ¶
type SQLiteDriver struct {
// contains filtered or unexported fields
}
SQLiteDriver implements driver.Driver using database/sql with the modernc.org/sqlite pure-Go driver.
func New ¶
func New(dsn string) (*SQLiteDriver, error)
New opens a SQLite database at the given DSN and enables WAL mode. No context is required for connection — SQLite is an embedded database.
func (*SQLiteDriver) BeginTx ¶
BeginTx starts a new database transaction with the given options. SQLite only supports SERIALIZABLE isolation, so the isolation level is ignored. Only the ReadOnly flag is forwarded.
func (*SQLiteDriver) Close ¶
func (d *SQLiteDriver) Close()
Close closes the underlying database connection.
Click to show internal directories.
Click to hide internal directories.