Documentation
¶
Overview ¶
Package db handles database operations including schema management and migrations.
Index ¶
Constants ¶
View Source
const CreateChunkEmbeddingsTable = `` /* 126-byte string literal not displayed */
View Source
const CreateChunksTable = `` /* 361-byte string literal not displayed */
View Source
const CreateIndexChunksRepoID = `CREATE INDEX IF NOT EXISTS idx_chunks_repo_id ON chunks(repo_id)`
View Source
const CreateIndexRepoEmbeddedHash = `CREATE INDEX IF NOT EXISTS idx_repos_embedded_hash ON repos(embedded_hash)`
View Source
const CreateIndexRepoPushedAtHash = `CREATE INDEX IF NOT EXISTS idx_repos_pushed_at_hash ON repos(pushed_at_hash)`
View Source
const CreateIndexReposFullName = `CREATE INDEX IF NOT EXISTS idx_repos_full_name ON repos(full_name)`
Index definitions
View Source
const CreateIndexReposGitHubID = `CREATE INDEX IF NOT EXISTS idx_repos_github_id ON repos(github_id)`
View Source
const CreateIndexReposIsStarred = `CREATE INDEX IF NOT EXISTS idx_repos_is_starred ON repos(is_starred)`
View Source
const CreateIndexReposLanguage = `CREATE INDEX IF NOT EXISTS idx_repos_language ON repos(language)`
View Source
const CreateReposTable = `` /* 781-byte string literal not displayed */
View Source
const CreateSyncStateTable = `` /* 317-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func IsWALEnabled ¶
IsWALEnabled checks if WAL mode is enabled for the database.
func Open ¶
Open opens (or creates) the SQLite database at the given path, applies all pragmas, loads the sqlite-vec extension, and runs schema migrations. The caller is responsible for calling Close().
func RunMigrations ¶
RunMigrations runs all schema migrations. Each statement is idempotent (IF NOT EXISTS) so running migrations multiple times is safe.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.