Documentation
¶
Index ¶
- func NewInMemoryBackend(opts ...option) *sqliteBackend
- func NewSqliteBackend(path string, opts ...option) *sqliteBackend
- func NewSqliteBackendWithDB(db *sql.DB, opts ...option) *sqliteBackend
- func WithApplyMigrations(applyMigrations bool) option
- func WithBackendOptions(opts ...backend.BackendOption) option
- type Scanner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewInMemoryBackend ¶
func NewInMemoryBackend(opts ...option) *sqliteBackend
func NewSqliteBackend ¶
func NewSqliteBackend(path string, opts ...option) *sqliteBackend
func NewSqliteBackendWithDB ¶
NewSqliteBackendWithDB creates a new SQLite backend using an existing database connection. When using this constructor, the backend will not close the database connection when Close() is called. Migrations can still be applied using WithApplyMigrations(true) as SQLite does not require special connection settings for migrations. Note: The caller is responsible for configuring the connection appropriately (e.g., WAL mode, busy timeout, max open connections).
func WithApplyMigrations ¶
func WithApplyMigrations(applyMigrations bool) option
WithApplyMigrations automatically applies database migrations on startup.
func WithBackendOptions ¶
func WithBackendOptions(opts ...backend.BackendOption) option
WithBackendOptions allows to pass generic backend options.
Types ¶
Click to show internal directories.
Click to hide internal directories.