From 1638aa57a04284c361df5cfefcfe718cf5c2989c Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 26 Aug 2026 20:20:10 +0000 Subject: [PATCH] Make docs/ a pure Markdown content directory Remove the Read the Docs and Sphinx configuration (.readthedocs.yaml, conf.py, requirements.txt, Makefile, theme templates and static assets) along with the docs pip ecosystem in dependabot and the .readthedocs.yaml entries in workflow paths-ignore lists. Port the three remaining reStructuredText files to Markdown: index.rst becomes index.md, and language-support and using-go-and-pgx are now GitHub-flavored Markdown using alert-style admonitions. Links that pointed at .rst files now point at their .md replacements. Add docs/toc.yaml, which declares the navigation order previously held in index.rst's toctree directives: every page appears exactly once, either in a titled section or in the unlisted set. This file is the contract a docs site consumer reads, and a future Go-based linter will enforce it. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_013XDcHxZk9UzfzMLayG66Zq --- .github/dependabot.yml | 14 -- .github/workflows/buf.yml | 1 - .github/workflows/ci-kotlin.yml | 2 - .github/workflows/ci-python.yml | 2 - .github/workflows/ci-typescript.yml | 2 - .readthedocs.yaml | 30 ----- docs/Makefile | 28 ---- docs/_static/customize.css | 17 --- docs/_static/favicon.png | Bin 233 -> 0 bytes docs/_static/logo.png | Bin 14081 -> 0 bytes docs/_templates/breadcrumbs.html | 7 - docs/_templates/layout.html | 6 - docs/conf.py | 83 ------------ docs/guides/using-go-and-pgx.md | 125 +++++++++++++++++ docs/guides/using-go-and-pgx.rst | 133 ------------------- docs/index.md | 22 +++ docs/index.rst | 102 -------------- docs/reference/language-support.md | 34 +++++ docs/reference/language-support.rst | 58 -------- docs/requirements.txt | 27 ---- docs/toc.yaml | 71 ++++++++++ docs/tutorials/getting-started-mysql.md | 2 +- docs/tutorials/getting-started-postgresql.md | 2 +- docs/tutorials/getting-started-sqlite.md | 2 +- 24 files changed, 255 insertions(+), 515 deletions(-) delete mode 100644 .readthedocs.yaml delete mode 100644 docs/Makefile delete mode 100644 docs/_static/customize.css delete mode 100644 docs/_static/favicon.png delete mode 100644 docs/_static/logo.png delete mode 100644 docs/_templates/breadcrumbs.html delete mode 100644 docs/_templates/layout.html delete mode 100644 docs/conf.py create mode 100644 docs/guides/using-go-and-pgx.md delete mode 100644 docs/guides/using-go-and-pgx.rst create mode 100644 docs/index.md delete mode 100644 docs/index.rst create mode 100644 docs/reference/language-support.md delete mode 100644 docs/reference/language-support.rst delete mode 100644 docs/requirements.txt create mode 100644 docs/toc.yaml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index ecbac919d7..69ec223b70 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -17,18 +17,4 @@ updates: directory: "/" schedule: interval: "daily" - - package-ecosystem: "pip" - directory: "/docs" - schedule: - interval: "daily" - ignore: - # sphinx-rtd-theme does not support the latest versions of docutils and - # sphinx - - dependency-name: "docutils" - - dependency-name: "sphinx" - groups: - production-dependencies: - dependency-type: "production" - development-dependencies: - dependency-type: "development" diff --git a/.github/workflows/buf.yml b/.github/workflows/buf.yml index 7bc91bbf31..c77e9b459d 100644 --- a/.github/workflows/buf.yml +++ b/.github/workflows/buf.yml @@ -3,7 +3,6 @@ on: pull_request: paths-ignore: - 'docs/**' - - '.readthedocs.yaml' jobs: build: runs-on: ubuntu-latest diff --git a/.github/workflows/ci-kotlin.yml b/.github/workflows/ci-kotlin.yml index 8d9ee558fc..177787bf7e 100644 --- a/.github/workflows/ci-kotlin.yml +++ b/.github/workflows/ci-kotlin.yml @@ -5,11 +5,9 @@ on: - main paths-ignore: - 'docs/**' - - '.readthedocs.yaml' pull_request: paths-ignore: - 'docs/**' - - '.readthedocs.yaml' jobs: build: if: false diff --git a/.github/workflows/ci-python.yml b/.github/workflows/ci-python.yml index befe534d08..47328c7b71 100644 --- a/.github/workflows/ci-python.yml +++ b/.github/workflows/ci-python.yml @@ -5,11 +5,9 @@ on: - main paths-ignore: - 'docs/**' - - '.readthedocs.yaml' pull_request: paths-ignore: - 'docs/**' - - '.readthedocs.yaml' jobs: build: if: false diff --git a/.github/workflows/ci-typescript.yml b/.github/workflows/ci-typescript.yml index 7f0a15f15c..e5aac81fca 100644 --- a/.github/workflows/ci-typescript.yml +++ b/.github/workflows/ci-typescript.yml @@ -5,11 +5,9 @@ on: - main paths-ignore: - 'docs/**' - - '.readthedocs.yaml' pull_request: paths-ignore: - 'docs/**' - - '.readthedocs.yaml' jobs: build: if: false diff --git a/.readthedocs.yaml b/.readthedocs.yaml deleted file mode 100644 index 7895c313e4..0000000000 --- a/.readthedocs.yaml +++ /dev/null @@ -1,30 +0,0 @@ -# .readthedocs.yaml -# Read the Docs configuration file -# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details - -# Required -version: 2 - -# Set the version of Python and other tools you might need -build: - os: ubuntu-22.04 - tools: - python: "3.11" - jobs: - post_checkout: - # Cancel PR builds that don't touch the docs. - # https://docs.readthedocs.io/en/stable/build-customization.html#cancel-build-based-on-a-condition - - | - if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && git diff --quiet origin/main -- docs/ .readthedocs.yaml; then - exit 183 - fi - -# Build documentation in the docs/ directory with Sphinx -sphinx: - configuration: docs/conf.py - -# We recommend specifying your dependencies to enable reproducible builds: -# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html -python: - install: - - requirements: docs/requirements.txt diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index 541c08d37b..0000000000 --- a/docs/Makefile +++ /dev/null @@ -1,28 +0,0 @@ -# Minimal makefile for Sphinx documentation -# - -# You can set these variables from the command line, and also -# from the environment for the first two. -SPHINXOPTS ?= -VENVDIR = _venv -BINDIR = $(VENVDIR)/bin -SPHINXBUILD = $(BINDIR)/sphinx-build -SOURCEDIR = . -BUILDDIR = _build - -# Put it first so that "make" without argument is like "make help". -help: $(SPHINXBUILD) - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - -$(SPHINXBUILD): $(VENVDIR) - $(VENVDIR)/bin/pip install -r requirements.txt - -$(VENVDIR): - python3 -m venv $(VENVDIR) - -.PHONY: help Makefile - -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/_static/customize.css b/docs/_static/customize.css deleted file mode 100644 index a2dac557be..0000000000 --- a/docs/_static/customize.css +++ /dev/null @@ -1,17 +0,0 @@ -.wy-side-nav-search img { - padding: 5px 60px !important; -} - -#banner { - text-align: center; - background: #2980b9; - border: 1px solid rgb(52, 49, 49); - color: #F0F0F4; - padding: 10px; - margin-bottom: 1.618em; -} - -#banner > div > a { - color: #F0F0F4; - text-decoration: underline; -} diff --git a/docs/_static/favicon.png b/docs/_static/favicon.png deleted file mode 100644 index 17d8419a6cb6dfa327885f5c7f1bfe5a604bb94e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 233 zcmV&aR?^=>QqsodAr! zIZ=mR)Ua9%qHfc2LDwMA35^g9Ni7y>_yK?QVj^0M japxtW^x&(FwRL_2ulO=-f7IWi00000NkvXXu0mjf`KVz8 diff --git a/docs/_static/logo.png b/docs/_static/logo.png deleted file mode 100644 index dd8a887094aadb38d2e4c56f0d806a0adc016956..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14081 zcma*OcUY56_bnU{q*p1@K}G4kNJkJ*I!KjXLQiO+i+~772Z2bDZlw1TNN7q2kq$x# zRk{)B9ZuBedC&P>-}j#DH}@;13deIvH-vhPG4b_w4FOhz~;A)fIr9s8w~)+D)@WY*tr5B?6yEhXRzFz9c23*c4vFJJI3N#LRucm zKqu!XfnLC8f!YRkfv$E^_IDKI*=7Buu>c?-#D?7;wfDpf(kdO$wq?CZLgqWzf2p_wMkcg0=kg%Yr5Wldvw78J8 z=tK5@UU#tByzCvM^&hMLlMDMv?v4`#;vp?4=;!Ar;3q2J?&T;bEF~o+C?p~%BEpaL z;P(yy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{N4OfnbD|Dp? zibdTteroNbhJ3zlIzTG8D(^R>k_I;8@vvwv|7lO&&)RA~m9UGnd=veifhv{_E6hu9 zwwuq9Ix~=nM?F(*aVj(E(ckE!gD$UqtXLA|A=e7%6o~aqHT0S*B`*KzBx6tm*pB-4 zoTsfxs&GXCKgrT@^XRLbs?n-+EPus;B=Km2ro*kJAP#{etVq`Y%4z#@reiFA9bY7v ze3jrCBF1$EjTMV}Hv6iRd(b5^ zq57+T|3>7iy_91A+DgG~;)+ILt6Br|)6?i|I3KKns120OG+k^O!uBHb5Uu$@mS$uS+?t7iI*XoDa^8lTDh(-S`6$d4sGde zO8uXb#e5Rwx~V%&;woD}q;3!SW+xYiDtW*Nw@9&^_P+!e<0?|@YwC!*5%kK`+EMTH zQrK25U4CN^o1~Xkj!5jJO`2(fxlsV>Gb^=jZro*Q!b-3K|1S#d{~;Owqul-h6F%)r|7_w>`Rf6s%E#E#P;-_?}TzzsP@gSLkP{2@J=7D2{^! zSBfeB_(XUWqB#DI_WFQ|__tjfg~I&X7M=x}-Q8gM8?YCLq5~&lPd@yi+IttA)gyrZL$Q`A?d?NYpx-+?Od)=C3Cy59#Gyczirlm?fJl)*Hi7EKN85mYvTO$%_Q7`Zjn%{+zoARZ1#G zOz2ZysDpcNfBFT`z4QAN%PuZJEX;Y%s6MqEq6G)eIbgcmQQa7~IRZei4G(qz$!y|K z@iw-WaM&Ew$Lupm7~VYR;FUE6dh+d|Io4_Q8viyRbNEE4fFB|Md(J*p(SBU1Wc})Y E0ZKVQcK`qY diff --git a/docs/_templates/breadcrumbs.html b/docs/_templates/breadcrumbs.html deleted file mode 100644 index 40a8b82be1..0000000000 --- a/docs/_templates/breadcrumbs.html +++ /dev/null @@ -1,7 +0,0 @@ -{% extends "!breadcrumbs.html" %} - -{% block breadcrumbs %} -{% if show_banner %} -{% endif %} -{{ super() }} -{% endblock %} diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html deleted file mode 100644 index fa58fc5a73..0000000000 --- a/docs/_templates/layout.html +++ /dev/null @@ -1,6 +0,0 @@ -{% extends "!layout.html" %} - -{% block extrahead %} - -{{ super() }} -{% endblock %} diff --git a/docs/conf.py b/docs/conf.py deleted file mode 100644 index ff6f4df419..0000000000 --- a/docs/conf.py +++ /dev/null @@ -1,83 +0,0 @@ -# Configuration file for the Sphinx documentation builder. -# -# This file only contains a selection of the most common options. For a full -# list see the documentation: -# https://www.sphinx-doc.org/en/master/usage/configuration.html - -# -- Path setup -------------------------------------------------------------- - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -# -import os -# import sys -# sys.path.insert(0, os.path.abspath('.')) -import sphinx_rtd_theme - -# -- Project information ----------------------------------------------------- - -project = 'sqlc' -copyright = '2024, Riza, Inc.' -author = 'Riza, Inc.' - -# The full version, including alpha/beta/rc tags -release = '1.31.1' - - -# -- General configuration --------------------------------------------------- - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. -extensions = [ - 'myst_parser', - 'sphinx_rtd_theme', - 'sphinx_favicon', - 'sphinxext.rediraffe', -] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -# This pattern also affects html_static_path and html_extra_path. -exclude_patterns = ['_build', '_venv', 'Thumbs.db', '.DS_Store'] - -# -- Options for HTML output ------------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -# -html_theme = 'sphinx_rtd_theme' - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] - -html_logo = "_static/logo.png" -html_theme_options = { - 'logo_only': True, -} - -html_context = { - 'show_banner': 'SHOW_LAUNCH_BANNER' in os.environ, -} - -def setup(app): - app.add_css_file('customize.css') - -favicons = [ - "favicon.png", -] - -myst_enable_extensions = [ - "attrs_inline", - "colon_fence", -] - -rediraffe_redirects = { - "howto/upload.md": "howto/push.md", -} diff --git a/docs/guides/using-go-and-pgx.md b/docs/guides/using-go-and-pgx.md new file mode 100644 index 0000000000..c5b9db7cc5 --- /dev/null +++ b/docs/guides/using-go-and-pgx.md @@ -0,0 +1,125 @@ +# Using Go and pgx + +> [!NOTE] +> `pgx/v5` is supported starting from v1.18.0. + +pgx is a pure Go driver and toolkit for PostgreSQL. It's become the default +PostgreSQL package for many Gophers since lib/pq was put into maintenance mode. + +## Getting started + +To start generating code that uses pgx, set the `sql_package` field in +your `sqlc.yaml` configuration file. Valid options are `pgx/v4` or +`pgx/v5` + +```yaml +version: "2" +sql: + - engine: "postgresql" + queries: "query.sql" + schema: "query.sql" + gen: + go: + package: "db" + sql_package: "pgx/v5" + out: "db" +``` + +If you don't have an existing sqlc project on hand, create a directory with the +configuration file above and the following `query.sql` file. + +```sql +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY, + name text NOT NULL, + bio text +); + +-- name: GetAuthor :one +SELECT * FROM authors +WHERE id = $1 LIMIT 1; + +-- name: ListAuthors :many +SELECT * FROM authors +ORDER BY name; + +-- name: CreateAuthor :one +INSERT INTO authors ( + name, bio +) VALUES ( + $1, $2 +) +RETURNING *; + +-- name: DeleteAuthor :exec +DELETE FROM authors +WHERE id = $1; +``` + +Generating the code will now give you pgx-compatible database access methods. + +```bash +sqlc generate +``` + +## Generated code walkthrough + +The generated code is very similar to the code generated when using +`lib/pq`. However, instead of using `database/sql`, the code uses +pgx types directly. + +```go +package main + +import ( + "context" + "fmt" + "os" + + "github.com/jackc/pgx/v5" + + "example.com/sqlc-tutorial/db" +) + +func main() { + // urlExample := "postgres://username:password@localhost:5432/database_name" + conn, err := pgx.Connect(context.Background(), os.Getenv("DATABASE_URL")) + if err != nil { + fmt.Fprintf(os.Stderr, "Unable to connect to database: %v\n", err) + os.Exit(1) + } + defer conn.Close(context.Background()) + + q := db.New(conn) + + author, err := q.GetAuthor(context.Background(), 1) + if err != nil { + fmt.Fprintf(os.Stderr, "GetAuthor failed: %v\n", err) + os.Exit(1) + } + + fmt.Println(author.Name) +} +``` + +> [!NOTE] +> For production applications, consider using pgxpool for connection pooling: +> +> ```go +> import ( +> "github.com/jackc/pgx/v5/pgxpool" +> "example.com/sqlc-tutorial/db" +> ) +> +> func main() { +> pool, err := pgxpool.New(context.Background(), os.Getenv("DATABASE_URL")) +> if err != nil { +> fmt.Fprintf(os.Stderr, "Unable to create connection pool: %v\n", err) +> os.Exit(1) +> } +> defer pool.Close() +> +> q := db.New(pool) +> // Use q the same way as with single connections +> } +> ``` diff --git a/docs/guides/using-go-and-pgx.rst b/docs/guides/using-go-and-pgx.rst deleted file mode 100644 index 68e2242926..0000000000 --- a/docs/guides/using-go-and-pgx.rst +++ /dev/null @@ -1,133 +0,0 @@ -================ -Using Go and pgx -================ - -.. note:: - :code:`pgx/v5` is supported starting from v1.18.0. - - -pgx is a pure Go driver and toolkit for PostgreSQL. It's become the default -PostgreSQL package for many Gophers since lib/pq was put into maintenance mode. - -^^^^^^^^^^^^^^^ -Getting started -^^^^^^^^^^^^^^^ - -To start generating code that uses pgx, set the :code:`sql_package` field in -your :code:`sqlc.yaml` configuration file. Valid options are :code:`pgx/v4` or -:code:`pgx/v5` - -.. code-block:: yaml - - version: "2" - sql: - - engine: "postgresql" - queries: "query.sql" - schema: "query.sql" - gen: - go: - package: "db" - sql_package: "pgx/v5" - out: "db" - -If you don't have an existing sqlc project on hand, create a directory with the -configuration file above and the following :code:`query.sql` file. - -.. code-block:: sql - - CREATE TABLE authors ( - id BIGSERIAL PRIMARY KEY, - name text NOT NULL, - bio text - ); - - -- name: GetAuthor :one - SELECT * FROM authors - WHERE id = $1 LIMIT 1; - - -- name: ListAuthors :many - SELECT * FROM authors - ORDER BY name; - - -- name: CreateAuthor :one - INSERT INTO authors ( - name, bio - ) VALUES ( - $1, $2 - ) - RETURNING *; - - -- name: DeleteAuthor :exec - DELETE FROM authors - WHERE id = $1; - - -Generating the code will now give you pgx-compatible database access methods. - -.. code-block:: bash - - sqlc generate - -^^^^^^^^^^^^^^^^^^^^^^^^^^ -Generated code walkthrough -^^^^^^^^^^^^^^^^^^^^^^^^^^ - -The generated code is very similar to the code generated when using -:code:`lib/pq`. However, instead of using :code:`database/sql`, the code uses -pgx types directly. - -.. code-block:: go - - package main - - import ( - "context" - "fmt" - "os" - - "github.com/jackc/pgx/v5" - - "example.com/sqlc-tutorial/db" - ) - - func main() { - // urlExample := "postgres://username:password@localhost:5432/database_name" - conn, err := pgx.Connect(context.Background(), os.Getenv("DATABASE_URL")) - if err != nil { - fmt.Fprintf(os.Stderr, "Unable to connect to database: %v\n", err) - os.Exit(1) - } - defer conn.Close(context.Background()) - - q := db.New(conn) - - author, err := q.GetAuthor(context.Background(), 1) - if err != nil { - fmt.Fprintf(os.Stderr, "GetAuthor failed: %v\n", err) - os.Exit(1) - } - - fmt.Println(author.Name) - } - -.. note:: - For production applications, consider using pgxpool for connection pooling: - - .. code-block:: go - - import ( - "github.com/jackc/pgx/v5/pgxpool" - "example.com/sqlc-tutorial/db" - ) - - func main() { - pool, err := pgxpool.New(context.Background(), os.Getenv("DATABASE_URL")) - if err != nil { - fmt.Fprintf(os.Stderr, "Unable to create connection pool: %v\n", err) - os.Exit(1) - } - defer pool.Close() - - q := db.New(pool) - // Use q the same way as with single connections - } diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000000..4b7f203033 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,22 @@ +# sqlc Documentation + +> And lo, the Great One looked down upon the people and proclaimed: +> "SQL is actually pretty great" + +sqlc generates **fully type-safe idiomatic Go code** from SQL. Here's how it +works: + +1. You write SQL queries +2. You run sqlc to generate Go code that presents type-safe interfaces to those + queries +3. You write application code that calls the methods sqlc generated + +Seriously, it's that easy. You don't have to write any boilerplate SQL querying +code ever again. + +## Getting started + +- [Installing sqlc](overview/install.md) +- [Getting started with MySQL](tutorials/getting-started-mysql.md) +- [Getting started with PostgreSQL](tutorials/getting-started-postgresql.md) +- [Getting started with SQLite](tutorials/getting-started-sqlite.md) diff --git a/docs/index.rst b/docs/index.rst deleted file mode 100644 index f11c8903d5..0000000000 --- a/docs/index.rst +++ /dev/null @@ -1,102 +0,0 @@ -.. sqlc documentation master file, created by - sphinx-quickstart on Mon Feb 1 23:18:36 2021. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - -sqlc Documentation -================== - - And lo, the Great One looked down upon the people and proclaimed: - "SQL is actually pretty great" - -sqlc generates **fully type-safe idiomatic Go code** from SQL. Here's how it -works: - -1. You write SQL queries -2. You run sqlc to generate Go code that presents type-safe interfaces to those - queries -3. You write application code that calls the methods sqlc generated - -Seriously, it's that easy. You don't have to write any boilerplate SQL querying -code ever again. - -.. toctree:: - :maxdepth: 2 - :caption: Overview - :hidden: - - overview/install.md - -.. toctree:: - :maxdepth: 2 - :caption: Tutorials - :hidden: - - tutorials/getting-started-mysql.md - tutorials/getting-started-postgresql.md - tutorials/getting-started-sqlite.md - -.. toctree:: - :maxdepth: 2 - :caption: Commands - :hidden: - - howto/analyze.md - howto/generate.md - howto/parse.md - howto/push.md - howto/verify.md - howto/vet.md - -.. toctree:: - :maxdepth: 2 - :caption: How-to Guides - :hidden: - - howto/select.md - howto/query_count.md - howto/insert.md - howto/update.md - howto/delete.md - - howto/prepared_query.md - howto/transactions.md - howto/named_parameters.md - - howto/ddl.md - howto/structs.md - howto/embedding.md - howto/overrides.md - howto/rename.md - -.. toctree:: - :maxdepth: 3 - :caption: sqlc Cloud - :hidden: - - howto/managed-databases.md - -.. toctree:: - :maxdepth: 3 - :caption: Reference - :hidden: - - reference/changelog.md - reference/cli.md - reference/config.md - reference/datatypes.md - reference/environment-variables.md - reference/language-support.rst - reference/macros.md - reference/query-annotations.md - -.. toctree:: - :maxdepth: 2 - :caption: Conceptual Guides - :hidden: - - howto/ci-cd.md - guides/using-go-and-pgx.rst - guides/plugins.md - guides/development.md - guides/privacy.md diff --git a/docs/reference/language-support.md b/docs/reference/language-support.md new file mode 100644 index 0000000000..72f0a9f2e6 --- /dev/null +++ b/docs/reference/language-support.md @@ -0,0 +1,34 @@ +# Database and language support + +| Language | Plugin | MySQL | PostgreSQL | SQLite | +| ---------- | ---------------------------------------------------------------------- | ------ | ---------- | --------------- | +| Go | (built-in) | Stable | Stable | Beta | +| Go | [sqlc-gen-go](https://github.com/sqlc-dev/sqlc-gen-go) | Stable | Stable | Beta | +| Kotlin | [sqlc-gen-kotlin](https://github.com/sqlc-dev/sqlc-gen-kotlin) | Beta | Beta | Not implemented | +| Python | [sqlc-gen-python](https://github.com/sqlc-dev/sqlc-gen-python) | Beta | Beta | Not implemented | +| TypeScript | [sqlc-gen-typescript](https://github.com/sqlc-dev/sqlc-gen-typescript) | Beta | Beta | Not implemented | + +## Community language support + +New languages can be added via [plugins](../guides/plugins.md). + +| Language | Plugin | MySQL | PostgreSQL | SQLite | +| -------- | ------------------------------------------------------------------------------------- | ------ | ---------- | ------ | +| C# | [DaredevilOSS/sqlc-gen-csharp](https://github.com/DaredevilOSS/sqlc-gen-csharp) | Stable | Stable | Stable | +| F# | [kaashyapan/sqlc-gen-fsharp](https://github.com/kaashyapan/sqlc-gen-fsharp) | N/A | Beta | Beta | +| Java | [tandemdude/sqlc-gen-java](https://github.com/tandemdude/sqlc-gen-java) | Beta | Beta | N/A | +| PHP | [lcarilla/sqlc-plugin-php-dbal](https://github.com/lcarilla/sqlc-plugin-php-dbal) | Beta | N/A | N/A | +| Ruby | [DaredevilOSS/sqlc-gen-ruby](https://github.com/DaredevilOSS/sqlc-gen-ruby) | Beta | Beta | Beta | +| Zig | [tinyzimmer/sqlc-gen-zig](https://github.com/tinyzimmer/sqlc-gen-zig) | N/A | Beta | Beta | +| Python | [rayakame/sqlc-gen-better-python](https://github.com/rayakame/sqlc-gen-better-python) | N/A | Beta | Beta | +| Rust | [mathematic-inc/sqlc-gen-sqlx](https://github.com/mathematic-inc/sqlc-gen-sqlx) | N/A | Beta | N/A | +| \[Any\] | [fdietze/sqlc-gen-from-template](https://github.com/fdietze/sqlc-gen-from-template) | Stable | Stable | Stable | + +Plugins developed by our Community can also be found using our +[github topic](https://github.com/topics/sqlc-plugin). + +## Community projects + +| Language | Project | MySQL | PostgreSQL | SQLite | +| -------- | ----------------------------------------------------------------- | ------ | ---------- | ------ | +| Gleam | [daniellionel01/parrot](https://github.com/daniellionel01/parrot) | Stable | Stable | Stable | diff --git a/docs/reference/language-support.rst b/docs/reference/language-support.rst deleted file mode 100644 index 48840e1a3e..0000000000 --- a/docs/reference/language-support.rst +++ /dev/null @@ -1,58 +0,0 @@ -Database and language support -############################# - -========== ======================= ============ ============ =============== -Language Plugin MySQL PostgreSQL SQLite -========== ======================= ============ ============ =============== -Go (built-in) Stable Stable Beta -Go `sqlc-gen-go`_ Stable Stable Beta -Kotlin `sqlc-gen-kotlin`_ Beta Beta Not implemented -Python `sqlc-gen-python`_ Beta Beta Not implemented -TypeScript `sqlc-gen-typescript`_ Beta Beta Not implemented -========== ======================= ============ ============ =============== - -Community language support -************************** - -New languages can be added via :doc:`plugins <../guides/plugins>`. - -======== ================================== =============== =============== =============== -Language Plugin MySQL PostgreSQL SQLite -======== ================================== =============== =============== =============== -C# `DaredevilOSS/sqlc-gen-csharp`_ Stable Stable Stable -F# `kaashyapan/sqlc-gen-fsharp`_ N/A Beta Beta -Java `tandemdude/sqlc-gen-java`_ Beta Beta N/A -PHP `lcarilla/sqlc-plugin-php-dbal`_ Beta N/A N/A -Ruby `DaredevilOSS/sqlc-gen-ruby`_ Beta Beta Beta -Zig `tinyzimmer/sqlc-gen-zig`_ N/A Beta Beta -Python `rayakame/sqlc-gen-better-python`_ N/A Beta Beta -Rust `mathematic-inc/sqlc-gen-sqlx`_ N/A Beta N/A -[Any] `fdietze/sqlc-gen-from-template`_ Stable Stable Stable -======== ================================== =============== =============== =============== - -Plugins developed by our Community can also be found using our `github topic`_. - -Community projects -****************** - -======== ================================= =============== =============== =============== -Language Project MySQL PostgreSQL SQLite -======== ================================= =============== =============== =============== -Gleam `daniellionel01/parrot`_ Stable Stable Stable -======== ================================= =============== =============== =============== - -.. _sqlc-gen-go: https://github.com/sqlc-dev/sqlc-gen-go -.. _kaashyapan/sqlc-gen-fsharp: https://github.com/kaashyapan/sqlc-gen-fsharp -.. _sqlc-gen-kotlin: https://github.com/sqlc-dev/sqlc-gen-kotlin -.. _sqlc-gen-python: https://github.com/sqlc-dev/sqlc-gen-python -.. _sqlc-gen-typescript: https://github.com/sqlc-dev/sqlc-gen-typescript -.. _DaredevilOSS/sqlc-gen-csharp: https://github.com/DaredevilOSS/sqlc-gen-csharp -.. _DaredevilOSS/sqlc-gen-ruby: https://github.com/DaredevilOSS/sqlc-gen-ruby -.. _fdietze/sqlc-gen-from-template: https://github.com/fdietze/sqlc-gen-from-template -.. _lcarilla/sqlc-plugin-php-dbal: https://github.com/lcarilla/sqlc-plugin-php-dbal -.. _tandemdude/sqlc-gen-java: https://github.com/tandemdude/sqlc-gen-java -.. _tinyzimmer/sqlc-gen-zig: https://github.com/tinyzimmer/sqlc-gen-zig -.. _daniellionel01/parrot: https://github.com/daniellionel01/parrot -.. _rayakame/sqlc-gen-better-python: https://github.com/rayakame/sqlc-gen-better-python -.. _mathematic-inc/sqlc-gen-sqlx: https://github.com/mathematic-inc/sqlc-gen-sqlx -.. _github topic: https://github.com/topics/sqlc-plugin diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index fa2502d6ef..0000000000 --- a/docs/requirements.txt +++ /dev/null @@ -1,27 +0,0 @@ -Babel==2.18.0 -Jinja2==3.1.6 -MarkupSafe==3.0.3 -Pygments==2.21.0 -Sphinx==8.2.3 -certifi==2026.7.22 -chardet==7.6.0 -commonmark==0.9.2 -docutils==0.20.1 -idna==3.19 -imagesize==2.0.0 -myst-parser==5.1.0 -packaging==26.3 -pyparsing==3.3.2 -pytz==2026.3.post1 -requests==2.34.2 -snowballstemmer==3.1.1 -sphinx-favicon==1.1.0 -sphinx-rtd-theme==3.1.0 -sphinxcontrib-applehelp==2.0.0 -sphinxcontrib-devhelp==2.0.0 -sphinxcontrib-htmlhelp==2.1.0 -sphinxcontrib-jsmath==1.0.1 -sphinxcontrib-qthelp==2.0.0 -sphinxcontrib-serializinghtml==2.0.0 -sphinxext-rediraffe==0.3.0 -urllib3==2.7.0 diff --git a/docs/toc.yaml b/docs/toc.yaml new file mode 100644 index 0000000000..4cbdbcd152 --- /dev/null +++ b/docs/toc.yaml @@ -0,0 +1,71 @@ +# Navigation for the sqlc documentation site. +# +# Every page in docs/ must appear exactly once, either in a section or in +# the unlisted set. Unlisted pages are published but do not appear in the +# sidebar. + +index: index.md + +sections: + - title: Overview + pages: + - overview/install.md + + - title: Tutorials + pages: + - tutorials/getting-started-mysql.md + - tutorials/getting-started-postgresql.md + - tutorials/getting-started-sqlite.md + + - title: Commands + pages: + - howto/analyze.md + - howto/generate.md + - howto/parse.md + - howto/push.md + - howto/verify.md + - howto/vet.md + + - title: How-to Guides + pages: + - howto/select.md + - howto/query_count.md + - howto/insert.md + - howto/update.md + - howto/delete.md + - howto/prepared_query.md + - howto/transactions.md + - howto/named_parameters.md + - howto/ddl.md + - howto/structs.md + - howto/embedding.md + - howto/overrides.md + - howto/rename.md + + - title: sqlc Cloud + pages: + - howto/managed-databases.md + + - title: Reference + pages: + - reference/changelog.md + - reference/cli.md + - reference/config.md + - reference/datatypes.md + - reference/environment-variables.md + - reference/language-support.md + - reference/macros.md + - reference/query-annotations.md + + - title: Conceptual Guides + pages: + - howto/ci-cd.md + - guides/using-go-and-pgx.md + - guides/plugins.md + - guides/development.md + - guides/privacy.md + +unlisted: + - guides/migrating-off-hosted-managed-databases.md + - guides/migrating-to-sqlc-gen-kotlin.md + - guides/migrating-to-sqlc-gen-python.md diff --git a/docs/tutorials/getting-started-mysql.md b/docs/tutorials/getting-started-mysql.md index b9f5d0ddf5..25e7d6182c 100644 --- a/docs/tutorials/getting-started-mysql.md +++ b/docs/tutorials/getting-started-mysql.md @@ -4,7 +4,7 @@ This tutorial assumes that the latest version of sqlc is [installed](../overview/install.md) and ready to use. We'll generate Go code here, but other -[language plugins](../reference/language-support.rst) are available. You'll +[language plugins](../reference/language-support.md) are available. You'll naturally need the Go toolchain if you want to build and run a program with the code sqlc generates, but sqlc itself has no dependencies. diff --git a/docs/tutorials/getting-started-postgresql.md b/docs/tutorials/getting-started-postgresql.md index fc28f7155a..d6045cffbd 100644 --- a/docs/tutorials/getting-started-postgresql.md +++ b/docs/tutorials/getting-started-postgresql.md @@ -4,7 +4,7 @@ This tutorial assumes that the latest version of sqlc is [installed](../overview/install.md) and ready to use. We'll generate Go code here, but other -[language plugins](../reference/language-support.rst) are available. You'll +[language plugins](../reference/language-support.md) are available. You'll naturally need the Go toolchain if you want to build and run a program with the code sqlc generates, but sqlc itself has no dependencies. diff --git a/docs/tutorials/getting-started-sqlite.md b/docs/tutorials/getting-started-sqlite.md index 9017dd62e4..e5b45f86f1 100644 --- a/docs/tutorials/getting-started-sqlite.md +++ b/docs/tutorials/getting-started-sqlite.md @@ -4,7 +4,7 @@ This tutorial assumes that the latest version of sqlc is [installed](../overview/install.md) and ready to use. We'll generate Go code here, but other -[language plugins](../reference/language-support.rst) are available. You'll +[language plugins](../reference/language-support.md) are available. You'll naturally need the Go toolchain if you want to build and run a program with the code sqlc generates, but sqlc itself has no dependencies.