Documentation
¶
Overview ¶
Package sqlite provides SQLite helpers for testing without containers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InMemory ¶
InMemory creates an in-memory SQLite database. This is the fastest option, useful for unit tests.
Example:
db, cleanup, err := sqlite.InMemory()
if err != nil {
panic(err)
}
defer cleanup()
func NewWithOptions ¶
NewWithOptions starts a SQLite database with custom configuration.
Example:
db, cleanup, err := sqlite.NewWithOptions(
sqlite.WithMode("memory"),
sqlite.WithCache("shared"),
)
if err != nil {
panic(err)
}
defer cleanup()
Types ¶
Click to show internal directories.
Click to hide internal directories.