A SQL indexer for CodeMap, shipped as an independent PyPI package.
Indexes DDL (schema) statements so AI agents can answer "which table has
column X" and similar structural questions without scanning every
migration file. Query (SELECT/INSERT/...) statements are ignored —
they are not durable schema artefacts.
Backed by tree-sitter-sql:
| AST node | Symbol kind |
|---|---|
create_table |
class (with extra.sql_kind=table) |
create_view |
class (with extra.sql_kind=view) |
create_index |
variable (with extra.sql_kind=index) |
column_definition inside create_table |
field (attached to the table) |
Asset-style scheme: this plugin uses scip-sql so a downstream
http_route / orm_mapping bridge can cross-reference these
symbols against application code that talks to them.
scip-sql . . . db/migrations/0001_init.sql/users#
scip-sql . . . db/migrations/0001_init.sql/users#email.
scip-sql . . . db/migrations/0001_init.sql/idx_users_email.
pip install codemap-sql- Only DDL is indexed;
SELECT/INSERT/UPDATE/DELETEare walked past silently. CREATE PROCEDURE/CREATE FUNCTION/CREATE TRIGGERare not yet captured — the grammar reports them under generic statement nodes.- Dialect-specific features (e.g. PostgreSQL extensions) may not be parsed.
ALTER TABLEstatements that add columns are not tracked.
MIT.