diff --git a/README.md b/README.md index 4e818475..fea0df64 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ Questions or feedback? Join the [Discord](https://discord.gg/hikari). ([docs](https://sqlc-gen-better-python.rayakame.dev/docs/guide/drivers/)). - **Typed query functions** - one module per query file, one function per query ([docs](https://sqlc-gen-better-python.rayakame.dev/docs/guide/writing-queries/)). -- **PostgreSQL enums** as `enum.StrEnum` classes +- **PostgreSQL enum types and MySQL enum columns** as `enum.StrEnum` classes ([docs](https://sqlc-gen-better-python.rayakame.dev/docs/guide/enums/)). - **Type overrides and converters** - swap a column's Python type, or plug in your own encode/decode functions diff --git a/docs/assets/og-image.svg b/docs/assets/og-image.svg index acdc73de..89227d1f 100644 --- a/docs/assets/og-image.svg +++ b/docs/assets/og-image.svg @@ -16,5 +16,5 @@ sqlc-gen-better-python - A sqlc plugin - typed models and query functions for PostgreSQL and SQLite + Typed models and query functions for PostgreSQL, SQLite and MySQL diff --git a/docs/content/_index.md b/docs/content/_index.md index 034d55a8..deb44414 100644 --- a/docs/content/_index.md +++ b/docs/content/_index.md @@ -48,7 +48,7 @@ layout: hextra-home {{< hextra/feature-card title="Enums" link="docs/guide/enums" - subtitle="PostgreSQL enums become enum.StrEnum classes, wired through models and queries." + subtitle="PostgreSQL enum types and MySQL enum columns become enum.StrEnum classes, wired through models and queries." >}} {{< hextra/feature-card title="Type overrides & converters" @@ -175,7 +175,7 @@ Generated code is held to the same standard as hand-written code: - **Type-checked.** Every generated file passes pyright in strict mode and ruff. - **Tested against real databases.** The suite runs the generated code against - live PostgreSQL and SQLite, across every driver and model type. + live PostgreSQL, SQLite, and MySQL, across every driver and model type. - **Deterministic.** Output is byte-identical between runs, and CI fails if a change would silently alter what you get. diff --git a/docs/content/docs/_index.md b/docs/content/docs/_index.md index a2cad54e..b969f6d3 100644 --- a/docs/content/docs/_index.md +++ b/docs/content/docs/_index.md @@ -23,10 +23,10 @@ it. ## Explore by feature {{< cards >}} - {{< card link="guide/drivers" title="Drivers" icon="database" subtitle="asyncpg, psycopg, aiosqlite, sqlite3, and turso." >}} + {{< card link="guide/drivers" title="Drivers" icon="database" subtitle="asyncpg, psycopg, aiosqlite, sqlite3, asyncmy, pymysql, and turso." >}} {{< card link="guide/model-types" title="Model types" icon="cube" subtitle="dataclass, attrs, msgspec, or pydantic." >}} {{< card link="guide/writing-queries" title="Writing queries" icon="code" subtitle="How query annotations become typed functions." >}} - {{< card link="guide/enums" title="Enums" icon="collection" subtitle="PostgreSQL enums as enum.StrEnum classes." >}} + {{< card link="guide/enums" title="Enums" icon="collection" subtitle="PostgreSQL enum types and MySQL enum columns as enum.StrEnum classes." >}} {{< card link="guide/type-overrides" title="Type overrides" icon="adjustments" subtitle="Swap the Python type of a column." >}} {{< card link="guide/converters" title="Converters" icon="puzzle" subtitle="Your own encode/decode functions for a column." >}} {{< card link="guide/working-with-json" title="Working with JSON" icon="document-text" subtitle="Typed JSON columns with msgspec structs." >}} @@ -38,8 +38,8 @@ it. | | | |---|---| | **Python** | 3.12 or newer | -| **Engines** | PostgreSQL, SQLite | -| **Drivers** | `asyncpg`, `psycopg_async`, `psycopg_sync`, `aiosqlite`, `sqlite3`, and experimental `turso_async`/`turso_sync` | +| **Engines** | PostgreSQL, SQLite, MySQL | +| **Drivers** | `asyncpg`, `psycopg_async`, `psycopg_sync`, `aiosqlite`, `sqlite3`, `asyncmy`, `pymysql`, and experimental `turso_async`/`turso_sync` | | **Model types** | `dataclass`, `attrs`, `msgspec`, `pydantic` | | **Docstrings** | `google`, `numpy`, `pep257`, or none | | **Checked with** | pyright (strict) and ruff | diff --git a/docs/content/docs/guide/_index.md b/docs/content/docs/guide/_index.md index dd6ee345..7ad814fd 100644 --- a/docs/content/docs/guide/_index.md +++ b/docs/content/docs/guide/_index.md @@ -36,7 +36,7 @@ Start with the essentials, then dip into feature pages as you need them: {{< cards >}} {{< card link="configuration" title="Configuration" subtitle="The sqlc.yaml plugin block and the core options." >}} - {{< card link="drivers" title="Drivers" subtitle="asyncpg, psycopg, aiosqlite, sqlite3, and turso - and which query commands each supports." >}} + {{< card link="drivers" title="Drivers" subtitle="asyncpg, psycopg, aiosqlite, sqlite3, asyncmy, pymysql, and turso - and which query commands each supports." >}} {{< card link="model-types" title="Model types" subtitle="dataclass, attrs, msgspec, or pydantic models." >}} {{< card link="writing-queries" title="Writing queries" subtitle="How query annotations become typed Python functions." >}} {{< /cards >}} diff --git a/docs/static/images/og-image.png b/docs/static/images/og-image.png index 93a98c4f..2d3a1187 100644 Binary files a/docs/static/images/og-image.png and b/docs/static/images/og-image.png differ