Directories
¶
| Path | Synopsis |
|---|---|
|
Package builtinstubs registers metadata-only stubs for CockroachDB builtin functions into the parser's builtins registry.
|
Package builtinstubs registers metadata-only stubs for CockroachDB builtin functions into the parser's builtins registry. |
|
Package catalog provides a lightweight in-memory representation of a SQL schema loaded from CREATE TABLE DDL.
|
Package catalog provides a lightweight in-memory representation of a SQL schema loaded from CREATE TABLE DDL. |
|
Package config loads the optional crdb-sql.yaml project file that maps schema-file globs to query-file globs.
|
Package config loads the optional crdb-sql.yaml project file that maps schema-file globs to query-file globs. |
|
Package conn manages pgwire connections to CockroachDB clusters.
|
Package conn manages pgwire connections to CockroachDB clusters. |
|
Package diag converts CockroachDB parser errors into the structured output.Error type that the CLI envelope exposes to agents.
|
Package diag converts CockroachDB parser errors into the structured output.Error type that the CLI envelope exposes to agents. |
|
Package mcp builds the crdb-sql Model Context Protocol server.
|
Package mcp builds the crdb-sql Model Context Protocol server. |
|
proxy
Package proxy implements per-call routing of MCP tool calls from a long-lived `crdb-sql mcp` server to a sibling crdb-sql-vXXX backend whose parser quarter matches the caller's requested target_version.
|
Package proxy implements per-call routing of MCP tool calls from a long-lived `crdb-sql mcp` server to a sibling crdb-sql-vXXX backend whose parser quarter matches the caller's requested target_version. |
|
tools
Package tools provides MCP tool handler constructors for the SQL tools.
|
Package tools provides MCP tool handler constructors for the SQL tools. |
|
Package output defines the shared response shape every crdb-sql subcommand emits when --output=json, plus the renderer that switches between text and JSON.
|
Package output defines the shared response shape every crdb-sql subcommand emits when --output=json, plus the renderer that switches between text and JSON. |
|
Package risk provides a rule-based engine for detecting dangerous SQL patterns by inspecting the AST produced by the CockroachDB parser.
|
Package risk provides a rule-based engine for detecting dangerous SQL patterns by inspecting the AST produced by the CockroachDB parser. |
|
Package safety implements the Tier 3 statement allowlist that gates every cluster-bound command in crdb-sql (today: explain, simulate, execute).
|
Package safety implements the Tier 3 statement allowlist that gates every cluster-bound command in crdb-sql (today: explain, simulate, execute). |
|
Package schemawarn bridges catalog loader warnings into the standard envelope error stream.
|
Package schemawarn bridges catalog loader warnings into the standard envelope error stream. |
|
Package semcheck provides Tier 1 (zero-config) semantic checks that operate on parsed ASTs without a schema catalog or cluster connection.
|
Package semcheck provides Tier 1 (zero-config) semantic checks that operate on parsed ASTs without a schema catalog or cluster connection. |
|
Package sqlformat wraps the cockroachdb-parser module to provide SQL pretty-printing.
|
Package sqlformat wraps the cockroachdb-parser module to provide SQL pretty-printing. |
|
Package sqlinput resolves SQL text from the three input sources every SQL-consuming subcommand supports: an inline -e expression, a positional file argument, or standard input.
|
Package sqlinput resolves SQL text from the three input sources every SQL-consuming subcommand supports: an inline -e expression, a positional file argument, or standard input. |
|
Package sqlparse wraps the cockroachdb-parser module to provide SQL parsing utilities consumed by both the CLI and MCP layers.
|
Package sqlparse wraps the cockroachdb-parser module to provide SQL parsing utilities consumed by both the CLI and MCP layers. |
|
Package summarize produces a structured, AST-only description of a SQL statement: the operation, the tables it touches, the WHERE predicates, the joins, the columns it mutates, and a delegated risk level from the risk package.
|
Package summarize produces a structured, AST-only description of a SQL statement: the operation, the tables it touches, the WHERE predicates, the joins, the columns it mutates, and a delegated risk level from the risk package. |
|
Package testcorpus provides shared infrastructure for fidelity tests that run the curated SQL corpus through various parser and formatter APIs.
|
Package testcorpus provides shared infrastructure for fidelity tests that run the curated SQL corpus through various parser and formatter APIs. |
|
testutil
|
|
|
cockroachtest
Package cockroachtest spins up an in-memory single-node CockroachDB cluster (via `cockroach demo --background`) for use by integration tests in this module.
|
Package cockroachtest spins up an in-memory single-node CockroachDB cluster (via `cockroach demo --background`) for use by integration tests in this module. |
|
Package validateresult defines the JSON payload shape and shared constants used by the SQL validation surfaces (the `crdb-sql validate` CLI command and the `validate_sql` MCP tool).
|
Package validateresult defines the JSON payload shape and shared constants used by the SQL validation surfaces (the `crdb-sql validate` CLI command and the `validate_sql` MCP tool). |
|
Package version provides a registry of CockroachDB SQL features and the versions in which they were introduced (or removed).
|
Package version provides a registry of CockroachDB SQL features and the versions in which they were introduced (or removed). |
|
Package versionroute selects the per-quarter crdb-sql backend that matches the user's --target-version and re-execs into it.
|
Package versionroute selects the per-quarter crdb-sql backend that matches the user's --target-version and re-execs into it. |
Click to show internal directories.
Click to hide internal directories.