Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
db-catalyst
command
Package main implements the db-catalyst CLI.
|
Package main implements the db-catalyst CLI. |
|
sqlfix
command
Package main implements the sqlfix tool for automated SQL rewrites.
|
Package main implements the sqlfix tool for automated SQL rewrites. |
|
sqlfix-sqlc
command
Package main implements the sqlfix-sqlc tool for migrating sqlc configurations.
|
Package main implements the sqlfix-sqlc tool for migrating sqlc configurations. |
|
sqlc2dbcat
module
|
|
|
examples
|
|
|
advanced
command
|
|
|
complex
command
|
|
|
split_models
command
Command split_models demonstrates the optional models-package split, where the generated table-model structs live in their own Go sub-package (.../db/models) that the main querier package and application code import.
|
Command split_models demonstrates the optional models-package split, where the generated table-model structs live in their own Go sub-package (.../db/models) that the main querier package and application code import. |
|
internal
|
|
|
cache
Package cache provides caching for parsed schemas and query ASTs.
|
Package cache provides caching for parsed schemas and query ASTs. |
|
checkcore
Package checkcore provides the core query-validation logic shared by the check subcommand and the MCP server tools.
|
Package checkcore provides the core query-validation logic shared by the check subcommand and the MCP server tools. |
|
cli
Package cli provides the command-line interface logic for db-catalyst.
|
Package cli provides the command-line interface logic for db-catalyst. |
|
codegen
Package codegen orchestrates the generation of Go code from SQL.
|
Package codegen orchestrates the generation of Go code from SQL. |
|
codegen/ast
Package ast provides types and logic for building Go ASTs.
|
Package ast provides types and logic for building Go ASTs. |
|
codegen/render
Package render formats and writes generated Go code.
|
Package render formats and writes generated Go code. |
|
codegen/rust
Package rust generates Rust code using text templates.
|
Package rust generates Rust code using text templates. |
|
codegen/sql
Package sql generates SQL schema definitions from a database catalog.
|
Package sql generates SQL schema definitions from a database catalog. |
|
codegen/typescript
Package typescript generates TypeScript code using text templates.
|
Package typescript generates TypeScript code using text templates. |
|
config
Package config loads and validates the db-catalyst configuration.
|
Package config loads and validates the db-catalyst configuration. |
|
diagnostics
Package diagnostics provides rich diagnostic information for db-catalyst.
|
Package diagnostics provides rich diagnostic information for db-catalyst. |
|
engine
Package engine defines the database engine abstraction layer.
|
Package engine defines the database engine abstraction layer. |
|
engine/builtin
Package builtin registers all built-in database engines.
|
Package builtin registers all built-in database engines. |
|
engine/clickhouse
Package clickhouse provides the ClickHouse database engine implementation.
|
Package clickhouse provides the ClickHouse database engine implementation. |
|
engine/duckdb
Package duckdb provides the DuckDB database engine implementation.
|
Package duckdb provides the DuckDB database engine implementation. |
|
engine/mysql
Package mysql provides the MySQL database engine implementation.
|
Package mysql provides the MySQL database engine implementation. |
|
engine/postgres
Package postgres provides the PostgreSQL database engine implementation.
|
Package postgres provides the PostgreSQL database engine implementation. |
|
engine/sqlite
Package sqlite provides the SQLite database engine implementation.
|
Package sqlite provides the SQLite database engine implementation. |
|
engine/turso
Package turso provides the Turso Database engine implementation.
|
Package turso provides the Turso Database engine implementation. |
|
equiv
Package equiv implements a build-time DIFFERENTIAL equivalence gate for the optional-filters feature.
|
Package equiv implements a build-time DIFFERENTIAL equivalence gate for the optional-filters feature. |
|
fileset
Package fileset handles file path resolution and glob expansion.
|
Package fileset handles file path resolution and glob expansion. |
|
logging
Package logging provides a configured slog logger for db-catalyst.
|
Package logging provides a configured slog logger for db-catalyst. |
|
mcp
Package mcp implements a minimal stdio JSON-RPC 2.0 server that exposes read-only db-catalyst tools to AI agents via the Model Context Protocol (MCP).
|
Package mcp implements a minimal stdio JSON-RPC 2.0 server that exposes read-only db-catalyst tools to AI agents via the Model Context Protocol (MCP). |
|
parser
Package parser provides a high-level SQL parser with functional options.
|
Package parser provides a high-level SQL parser with functional options. |
|
parser/grammars
Package grammars defines SQL dialect grammars.
|
Package grammars defines SQL dialect grammars. |
|
parser/languages/graphql
Package graphql implements a GraphQL schema parser.
|
Package graphql implements a GraphQL schema parser. |
|
pipeline
Package pipeline orchestrates the entire code generation process.
|
Package pipeline orchestrates the entire code generation process. |
|
plugin/contract
Package contract defines the versioned, serialized IR exchanged between db-catalyst and out-of-process WASM codegen plugins (RFC 0002).
|
Package contract defines the versioned, serialized IR exchanged between db-catalyst and out-of-process WASM codegen plugins (RFC 0002). |
|
plugin/wasm
Package wasm runs out-of-process codegen plugins as sandboxed WebAssembly modules via wazero (pure-Go, no CGO).
|
Package wasm runs out-of-process codegen plugins as sandboxed WebAssembly modules via wazero (pure-Go, no CGO). |
|
query/analyzer
Package analyzer validates and resolves SQL queries against a schema catalog.
|
Package analyzer validates and resolves SQL queries against a schema catalog. |
|
query/block
Package block handles the parsing of SQL query blocks.
|
Package block handles the parsing of SQL query blocks. |
|
query/cache
Package cache provides caching annotations for SQL queries.
|
Package cache provides caching annotations for SQL queries. |
|
query/parser
Package parser implements a SQL parser for query validation and parameter extraction.
|
Package parser implements a SQL parser for query validation and parameter extraction. |
|
schema/diagnostic
Package diagnostic provides shared types for schema parsing diagnostics.
|
Package diagnostic provides shared types for schema parsing diagnostics. |
|
schema/migration
Package migration provides helpers for detecting and preprocessing SQL migration files produced by common migration tools (goose, dbmate, golang-migrate).
|
Package migration provides helpers for detecting and preprocessing SQL migration files produced by common migration tools (goose, dbmate, golang-migrate). |
|
schema/model
Package model defines normalized schema catalog types produced by the parser.
|
Package model defines normalized schema catalog types produced by the parser. |
|
schema/parser
Package parser implements a DDL parser for SQLite schemas.
|
Package parser implements a DDL parser for SQLite schemas. |
|
schema/parser/clickhouse
Package clickhouse provides a ClickHouse DDL parser.
|
Package clickhouse provides a ClickHouse DDL parser. |
|
schema/parser/mysql
Package mysql provides SQL keyword constants for the MySQL parser.
|
Package mysql provides SQL keyword constants for the MySQL parser. |
|
schema/parser/postgres
Package postgres provides SQL keyword constants for the PostgreSQL parser.
|
Package postgres provides SQL keyword constants for the PostgreSQL parser. |
|
schema/tokenizer
Package tokenizer scans SQL source code into tokens.
|
Package tokenizer scans SQL source code into tokens. |
|
sqlfix
Package sqlfix implements tools for automated SQL rewrites and migration.
|
Package sqlfix implements tools for automated SQL rewrites and migration. |
|
sqlfix/overrides
Package overrides handles conversion of sqlc configuration overrides to db-catalyst format.
|
Package overrides handles conversion of sqlc configuration overrides to db-catalyst format. |
|
sqlfix/sqlcconfig
Package sqlcconfig parses sqlc configuration files.
|
Package sqlcconfig parses sqlc configuration files. |
|
suggest
Package suggest provides opt-in LLM-assisted query repair hints.
|
Package suggest provides opt-in LLM-assisted query repair hints. |
|
testing/chaos
Package chaos provides utilities for chaos testing parsers with corrupt inputs.
|
Package chaos provides utilities for chaos testing parsers with corrupt inputs. |
|
transform
Package transform handles custom type transformations.
|
Package transform handles custom type transformations. |
|
types
Package types provides PostgreSQL-specific type mappings.
|
Package types provides PostgreSQL-specific type mappings. |
|
verify
Package verify refines static query analysis using engine-native query metadata.
|
Package verify refines static query analysis using engine-native query metadata. |
|
verify/livedb
Package livedb implements a verify.Verifier backed by a real database via database/sql.
|
Package livedb implements a verify.Verifier backed by a real database via database/sql. |
|
verify/mysql
Package mysql implements a verify.Verifier for MySQL using the go-sql-driver/mysql driver via database/sql.
|
Package mysql implements a verify.Verifier for MySQL using the go-sql-driver/mysql driver via database/sql. |
|
verify/postgres
Package postgres implements a verify.Verifier for PostgreSQL using the pgx native driver (github.com/jackc/pgx/v5).
|
Package postgres implements a verify.Verifier for PostgreSQL using the pgx native driver (github.com/jackc/pgx/v5). |
|
verify/provision
Package provision defines the Provisioner abstraction for spinning up ephemeral database instances during verify runs, and provides:
|
Package provision defines the Provisioner abstraction for spinning up ephemeral database instances during verify runs, and provides: |
|
verify/sqlite
Package sqlite implements a verify.Verifier backed by an in-memory modernc.org/sqlite database.
|
Package sqlite implements a verify.Verifier backed by an in-memory modernc.org/sqlite database. |
|
vet
Package vet provides a SQL query lint engine for db-catalyst.
|
Package vet provides a SQL query lint engine for db-catalyst. |
|
test
|
|
|
compat/harness
Package harness provides a reusable shared compile-corpus test helper for the db-catalyst compatibility test program.
|
Package harness provides a reusable shared compile-corpus test helper for the db-catalyst compatibility test program. |
Click to show internal directories.
Click to hide internal directories.