Documentation ¶
Overview ¶
Package sqlitereldb implements a [backend.RelationalDB] using the in-memory Golang SQLite package github.com/mattn/go-sqlite3.
If you are directly running go code (e.g. not from a docker container), the go-sqlite3 package requires CGO_ENABLED=1 and you must have gcc installed. See [https://github.com/mattn/go-sqlite3] for more details about installation instructions.
Index ¶
- type SqliteRelDB
- func (s *SqliteRelDB) Exec(ctx context.Context, query string, args ...any) (sql.Result, error)
- func (s *SqliteRelDB) Get(ctx context.Context, dst interface{}, query string, args ...any) error
- func (s *SqliteRelDB) Prepare(ctx context.Context, query string) (*sql.Stmt, error)
- func (s *SqliteRelDB) Query(ctx context.Context, query string, args ...any) (*sql.Rows, error)
- func (s *SqliteRelDB) Select(ctx context.Context, dst interface{}, query string, args ...any) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SqliteRelDB ¶
type SqliteRelDB struct {
// contains filtered or unexported fields
}
An in-memory relational DB that uses the go-sqlite3 package
func NewSqliteRelDB ¶
func NewSqliteRelDB(ctx context.Context) (*SqliteRelDB, error)
Instantiates a new SqliteRelDB instance that stores query data in-memory
Click to show internal directories.
Click to hide internal directories.