Skip to main content

rbtr-lang-sql

SQL support for rbtr. Optional plugin — install with pip install rbtr[sql].

What it ingests

One chunk per top-level SQL statement (plus one per CTE). SQL has no classes or functions in the object-oriented sense and no native import mechanism, so statements map onto rbtr's capture conventions by shape: structural definitions become classes, routines and executable statements become functions, and standalone named objects become variables.

  • Structural definitions — CREATE TABLE, CREATE VIEW / MATERIALIZED VIEW, CREATE TYPE ... AS ENUM / composite types.
  • Routines & statements — CREATE FUNCTION, SELECT, INSERT, UPDATE, DELETE, WITH ... AS (CTEs), ALTER / DROP.
  • Named objects — CREATE INDEX / SEQUENCE / SCHEMA / ROLE / TRIGGER.

CREATE PROCEDURE and PRAGMA are not extracted — the generic grammar has no node for them.

Chunks produced

name is the statement's target object; scope is always empty (SQL has no nesting). A statement with no nameable target (SELECT 1, a UNION) carries no name.

CREATE TABLE users (id INT, name TEXT);   -- class    "users"
CREATE VIEW active AS SELECT * FROM users; -- class    "active"
CREATE TYPE mood AS ENUM ('sad','happy');  -- class    "mood"
CREATE FUNCTION add(a INT) ...             -- function "add"
SELECT id, name FROM users;                -- function "users"
INSERT INTO logs (msg) VALUES ('hi');      -- function "logs"
WITH ranked AS (...) SELECT ...            -- function "ranked" (per CTE)
CREATE INDEX idx_name ON users (name);     -- variable "idx_name"
CREATE SEQUENCE order_id START 1;          -- variable "order_id"

Embedded / injected chunks

None. SQL does not embed other languages.

Grammar & dependencies

Uses the tree-sitter-sql grammar (one generic grammar for all dialects). No dependency on other language plugins.

Metadata

Release files for rbtr-lang-sql 2026.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rbtr-lang-sql 2026.9.0
File Size Uploaded Provenance Actions
rbtr_lang_sql-2026.9.0.tar.gz 12.6 kB Without provenance Details for rbtr_lang_sql-2026.9.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rbtr-lang-sql 2026.9.0
File Interpreter ABI Platform Actions
rbtr_lang_sql-2026.9.0-py3-none-any.whl Python 3 none any Details for rbtr_lang_sql-2026.9.0-py3-none-any.whl

Total release size: 34.9 kB

Release files / rbtr_lang_sql-2026.9.0.tar.gz

Download URL rbtr_lang_sql-2026.9.0.tar.gz
Size 12.6 kB
Tags Source
SHA-256 checksum
How to use checksums
e531ffe50dd47a0e52dc7b4f9282fe8598211a60fe45cfeb246c6d76ff65ebcb
BLAKE2b-256 checksum
How to use checksums
37ab22a122d381fcfa18090d6de878d175c1163b723577ea2b2a42f865a49906
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / rbtr_lang_sql-2026.9.0-py3-none-any.whl

Download URL rbtr_lang_sql-2026.9.0-py3-none-any.whl
Size 22.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
879a59b92aaf998957408cc0bddd4813171bb08617bbfbb1bc91c9ae6fcbdb4f
BLAKE2b-256 checksum
How to use checksums
0ee833b6c0acc1464ba07c4d33c42bb901bd93d4446955760fc5dfd765c04960
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for rbtr-lang-sql 2026.9.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page