Documentation
¶
Index ¶
- type Adapter
- func (a *Adapter) Close() error
- func (a *Adapter) Columns(ctx context.Context, tableName string) ([]string, error)
- func (a *Adapter) Query(ctx context.Context, query string) (db.QueryResult, error)
- func (a *Adapter) QuoteIdentifier(name string) string
- func (a *Adapter) Schema(ctx context.Context) (string, error)
- func (a *Adapter) Tables(ctx context.Context) ([]string, error)
- func (a *Adapter) Type() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
func NewAdapter ¶ added in v0.11.0
NewAdapter wraps an already-open *sql.DB as a sqlite Adapter. Used when the caller needs to retain the *sql.DB itself (e.g. to share the pool with code that writes to the database outside of Adapter.Query, such as the Bring & Join local database).
func OpenReadonly ¶ added in v0.11.0
OpenReadonly opens the database at path with SQLite's read-only URI mode.
This is the connection-level half of readonly and the only one asql has verified: with mode=ro the driver refuses writes, and — unlike the query_only pragma — the session cannot lift the restriction on itself (`PRAGMA query_only(0)` succeeds but writes still fail). ATTACH does succeed under mode=ro, so the statement guard has to refuse it separately.