Documentation
¶
Overview ¶
Package libsqldriver implements driver.Driver for libSQL / Turso using the database/sql libsql driver.
Index ¶
- type LibSQLDriver
- func (d *LibSQLDriver) Begin(ctx context.Context) (driver.Tx, error)
- func (d *LibSQLDriver) BeginTx(ctx context.Context, opts driver.TxOptions) (driver.Tx, error)
- func (d *LibSQLDriver) Close()
- func (d *LibSQLDriver) Exec(ctx context.Context, query string, args ...any) (int64, error)
- func (d *LibSQLDriver) Query(ctx context.Context, query string, args ...any) (driver.Rows, error)
- func (d *LibSQLDriver) 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 LibSQLDriver ¶
type LibSQLDriver struct {
// contains filtered or unexported fields
}
LibSQLDriver implements driver.Driver over a libSQL/Turso connection.
func New ¶
func New(dsn string) (*LibSQLDriver, error)
New opens a libSQL database at the given DSN (e.g. "libsql://name.turso.io?authToken=...").
func (*LibSQLDriver) BeginTx ¶
BeginTx starts a transaction. libSQL supports only SERIALIZABLE isolation, so the requested level is ignored; the ReadOnly flag is forwarded.
func (*LibSQLDriver) Close ¶
func (d *LibSQLDriver) Close()
Click to show internal directories.
Click to hide internal directories.