File detail
sqlite-schema.rq
reqlan rq/indexer/sqlite-schema.rq
| Idea | Status | Tags | Summary | Katz |
|---|---|---|---|---|
| ideas_index_sqlite | done | The ideas graph for one [base_ownership] lives at `<base>/.reqlan/ideas-index.sqlite` under [application_memory]. Schema version is in ( `SCHEMA_VERSION` in [schema_ts] and [schema_rust] ). Runtime migrate runs in Rust ( [store_rust] ); TypeScript opens the store and calls native migrate ( [sqlite_store] ). Keep [schema_ts] aligned with [schema_rust]. Related: [index], [indexer_rust], [ownership], [sidecars.sqlite_wal_sidecars], [diagnostics_schema.diagnostics_sqlite], [consumers.index_consumers]. | 0.226 | |
| meta_table | Table `meta` holds key / value rows ( `key TEXT PRIMARY KEY`, `value TEXT NOT NULL` ). Known keys: - `schema_version` — string form of [ideas_index_sqlite] version ( `"4"` ). - `extract_version` — extract-rule generation from the native engine. When it does not match the running engine, soft sync rebuilds so stale edges do not remain ( ["./indexer.rq".index], ["../language/syntax.rq".inline_code] ). [ideas_index_sqlite] | 0.040 | ||
| ideas_table | Table `ideas` stores one row per idea, one-liner, or ideaset. Columns: - `id` TEXT PRIMARY KEY - `name` TEXT NOT NULL - `kind` TEXT NOT NULL — `block` | `oneliner` | `ideaset` ( [index_types] ) - `file_uri` TEXT NOT NULL — path relative to the owning base root - `line_start` / `line_end` INTEGER NOT NULL - `summary` TEXT NOT NULL - `attributes_json` TEXT NOT NULL DEFAULT `'{}'` - `content_hash` TEXT NOT NULL - `git_created_at` / `git_modified_at` TEXT nullable - `git_change_count` INTEGER nullable ( schema v4 ) Indexes: `idx_ideas_file(file_uri)`, `idx_ideas_name(name)`. [ideas_index_sqlite] ["../extension/index-host/git-codelens.rq".git_dates_background_indexing] | 0.045 | ||
| edges_table | Table `edges` stores directed links in the ideas graph. Columns: - `id` TEXT PRIMARY KEY - `source_id` TEXT NOT NULL — FOREIGN KEY → `ideas(id)` ON DELETE CASCADE - `target_id` TEXT nullable — idea target when resolved - `target_file` TEXT nullable — file target ( for example comment links ) - `kind` TEXT NOT NULL — see [edge_kinds] - `label` TEXT nullable - `source_line` INTEGER ( schema v2 ) - `snippet` TEXT ( schema v2 ) - `is_resolved` INTEGER NOT NULL DEFAULT 1 ( schema v2 ) Indexes: `idx_edges_source`, `idx_edges_target`, `idx_edges_target_file`. [ideas_index_sqlite] ["./indexer.rq".wildcard_reference_edges] ["./indexer.rq".index_code_files] | 0.082 | ||
| edge_kinds | Persisted edge `kind` values ( [index_types] / analytical `EdgeKind` ): - `references` — idea → idea bracket or wiki reference - `wildcard_reference` — one row per wildcard match ( or one unresolved row ) - `file_reference` — idea → file path reference - `ideaset_member` — ideaset → member idea - `import` — import relationship - `comment_link` — idea ← code-file `rq:` comment ( ["./indexer.rq".index_code_files] ) [edges_table] | 0.051 | ||
| documents_table | Table `documents` tracks which files the indexer has seen. Columns: - `file_uri` TEXT PRIMARY KEY — base-relative path - `content_hash` TEXT NOT NULL - `indexed_at` TEXT NOT NULL - `mtime_ms` REAL ( schema v3 ) — soft sync skip when FS mtime matches Soft sync and idle stale checks use this table ( ["./sequencing.rq".soft_sync], ["./sequencing.rq".idle_stale_check] ). [ideas_index_sqlite] | 0.080 | ||
| schema_migrations | Base tables use `CREATE … IF NOT EXISTS` ( [schema_ts] `BASE_MIGRATIONS` / [schema_rust] ). Versioned upgrades run `(current+1)..=SCHEMA_VERSION`: - v2 — edge `source_line`, `snippet`, `is_resolved` - v3 — document `mtime_ms` - v4 — idea `git_change_count` Duplicate-column errors on ALTER are ignored so re-open is safe. Fresh databases create full v4 columns, then set `schema_version` to 4. Open pragmas: `foreign_keys=ON`, `journal_mode=WAL` ( [sidecars.sqlite_wal_sidecars] ). [ideas_index_sqlite] | 0.058 |
Related clusters
community
folder
file
status
status
tag
Local graph
Initialising graph…