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 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.4.6.tar.gz (5.1 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.4.6-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file codemap_sql-0.4.6.tar.gz.

File metadata

  • Download URL: codemap_sql-0.4.6.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for codemap_sql-0.4.6.tar.gz
Algorithm Hash digest
SHA256 b890ab34dae61e53de337875eefed8f06047dc3f0a60d400a941f5d7cd56b3ce
MD5 dd1fa7ea2c85acb81c1be4201e2f838a
BLAKE2b-256 e353f38c38396be8da23300f39c7b8dc074ce961996758c456f0dbb9299cbc45

See more details on using hashes here.

Provenance

The following attestation bundles were made for codemap_sql-0.4.6.tar.gz:

Publisher: publish.yml on qxbyte/codemap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file codemap_sql-0.4.6-py3-none-any.whl.

File metadata

  • Download URL: codemap_sql-0.4.6-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for codemap_sql-0.4.6-py3-none-any.whl
Algorithm Hash digest
SHA256 f69a864b53251054d6958a5e616f6b4d42aca1e5ee6ca4b47fa471a60f45bbb5
MD5 48915dceebc5573a15dc52762710ec4f
BLAKE2b-256 4efea00ab99c275c605fea1c885a3cf150f95f26477cdfa6da27dead205a4c40

See more details on using hashes here.

Provenance

The following attestation bundles were made for codemap_sql-0.4.6-py3-none-any.whl:

Publisher: publish.yml on qxbyte/codemap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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