Skip to main content

SQL indexer plugin for CodeMap

Project description

codemap-sql

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.

What it captures

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.

SymbolID encoding

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.

Install

pip install "git+https://github.com/qxbyte/codemap.git#subdirectory=plugins/codemap-sql"

Limits

  • Only DDL is indexed; SELECT / INSERT / UPDATE / DELETE are walked past silently.
  • CREATE PROCEDURE / CREATE FUNCTION / CREATE TRIGGER are not yet captured — the grammar reports them under generic statement nodes.
  • Dialect-specific features (e.g. PostgreSQL extensions) may not be parsed.
  • ALTER TABLE statements that add columns are not tracked.

License

MIT.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

codemap_sql-0.1.0a1.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

codemap_sql-0.1.0a1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file codemap_sql-0.1.0a1.tar.gz.

File metadata

  • Download URL: codemap_sql-0.1.0a1.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for codemap_sql-0.1.0a1.tar.gz
Algorithm Hash digest
SHA256 4bbcf5d72ac730a0623f72976699e6deea90cd501f9083fb9be8129e409d6fe1
MD5 d5a7c8dbeed2e95a07173c452f742e02
BLAKE2b-256 603166b6f60b2a4f6dee3f8db4ca9dc0111b7c6dfcbe525de45a05f7cc45a5ff

See more details on using hashes here.

File details

Details for the file codemap_sql-0.1.0a1-py3-none-any.whl.

File metadata

  • Download URL: codemap_sql-0.1.0a1-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for codemap_sql-0.1.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 0b55b4cedfe78929cbee7226eb8284f159cfd5c25d486e00ec9dc385fa0bdf7d
MD5 81dd07c4920590f2fc76060d8f7fdb62
BLAKE2b-256 c25ecad24e3334a031cb6292102c65c71f8e81de603860d986e1e82cb9f2b0a0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page