database

package
v0.0.0-...-3674af8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyMigrations

func ApplyMigrations(ctx context.Context, db *sql.DB) error

ApplyMigrations applies each embedded schema file once, in filename order. Keeping the migrations in the binary makes both local and deployed startup use the same schema path.

func GetConnection

func GetConnection(dbCfg config.Database) (*sql.DB, error)

GetConnection opens local SQLite or remote Turso. Local operations share one connection so competing writes queue in database/sql instead of failing with SQLITE_BUSY. A busy timeout also handles brief contention from other processes.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL