Documentation
¶
Overview ¶
Package database provides shared SQLite helpers for schema migration and connection management. All stores that open or migrate SQLite databases should use these helpers for consistency.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddColumn ¶
AddColumn idempotently adds a column to an existing table. If the column already exists the call is a no-op. The typedef parameter is the SQL type and optional constraints, for example "TEXT" or "INTEGER DEFAULT 0".
func HasColumn ¶
HasColumn reports whether the given table contains a column with the specified name. It uses a lightweight SELECT probe that avoids scanning any rows. Identifiers are left unquoted because SQLite treats double-quoted unknown identifiers as string literals, which would make the probe always succeed.
Types ¶
This section is empty.