Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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.dev3

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.dev3
File Size Uploaded
rbtr_lang_sql-2026.9.0.dev3.tar.gz 12.6 kB Details

Built distribution (wheel)

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

Total release size: 35.0 kB

Release files / rbtr_lang_sql-2026.9.0.dev3.tar.gz

Download URL rbtr_lang_sql-2026.9.0.dev3.tar.gz
Size 12.6 kB
Tags Source
SHA-256 checksum
How to use checksums
6742bd7d73e79f0bd2769de58f911c7b59bb3dd51fe515190a529fbedcddc885
BLAKE2b-256 checksum
How to use checksums
bfa852d4455d54086afc284baa4e8f7e15b18a41e68fa62cab5e18e9b8cde9a3
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.dev3-py3-none-any.whl

Download URL rbtr_lang_sql-2026.9.0.dev3-py3-none-any.whl
Size 22.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b541d0104a0fdfb622244e3742e9b2ed75d5b28965dc9b464da62178d05e7311
BLAKE2b-256 checksum
How to use checksums
bd44dc04ba44ca8f0ff651d35e929e50175cc5eafb58708a5e9d52df1014e676
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}
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