Documentation
¶
Overview ¶
Package sqlitetest provides a helper for opening in-memory SQLite test databases with consistent configuration.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OpenDB ¶
OpenDB returns a file-backed SQLite *bun.DB for testing. It creates the database in t.TempDir() so it is automatically cleaned up. A file-backed database avoids the data-loss hazard of :memory: databases whose content disappears when the connection pool closes and reopens a connection. The database is closed automatically when the test finishes.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.