From 4c4941657990a855d5133554c8cc522aac1534ce Mon Sep 17 00:00:00 2001 From: rayakame <202957330+rayakame@users.noreply.github.com> Date: Tue, 21 Jul 2026 21:49:04 +0000 Subject: [PATCH] Release v0.6.0 --- .changes/unreleased/Added-20260720-230000.yaml | 6 ------ .changes/unreleased/Added-20260721-140000.yaml | 6 ------ .changes/unreleased/Fixed-20260720-210000.yaml | 6 ------ .changes/unreleased/Fixed-20260721-210000.yaml | 6 ------ .changes/v0.6.0.md | 7 +++++++ CHANGELOG.md | 8 ++++++++ internal/config/constants.go | 2 +- 7 files changed, 16 insertions(+), 25 deletions(-) delete mode 100644 .changes/unreleased/Added-20260720-230000.yaml delete mode 100644 .changes/unreleased/Added-20260721-140000.yaml delete mode 100644 .changes/unreleased/Fixed-20260720-210000.yaml delete mode 100644 .changes/unreleased/Fixed-20260721-210000.yaml create mode 100644 .changes/v0.6.0.md diff --git a/.changes/unreleased/Added-20260720-230000.yaml b/.changes/unreleased/Added-20260720-230000.yaml deleted file mode 100644 index be9669af..00000000 --- a/.changes/unreleased/Added-20260720-230000.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: Added -body: 'Converters: a named pair of your own `to_db` / `from_db` functions that serialize and deserialize a column value, referenced by an override. Overrides could only convert by calling the type itself, which does not work for JSON and similar formats. The functions receive and return the type the column would have had without the override, are never called with `None` (nullable columns stay guarded), and convert list columns element-wise.' -time: 2026-07-20T23:00:00.0000000Z -custom: - Author: Rayakame - PR: "186" diff --git a/.changes/unreleased/Added-20260721-140000.yaml b/.changes/unreleased/Added-20260721-140000.yaml deleted file mode 100644 index 28d91fd4..00000000 --- a/.changes/unreleased/Added-20260721-140000.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: Added -body: 'Documentation site at https://rayakame.github.io/sqlc-gen-better-python/, with a getting started page, a guide covering configuration, drivers, model types, writing queries, enums, type overrides, converters, working with JSON, docstrings, SQLite type conversion and naming, and a reference for every configuration option, the SQL to Python type mappings of both engines and per-driver feature support. Every generated code example is taken from the committed test fixtures. The README now links to the site instead of documenting each feature inline.' -time: 2026-07-21T14:00:00.0000000Z -custom: - Author: Rayakame - PR: "208" diff --git a/.changes/unreleased/Fixed-20260720-210000.yaml b/.changes/unreleased/Fixed-20260720-210000.yaml deleted file mode 100644 index b550e7de..00000000 --- a/.changes/unreleased/Fixed-20260720-210000.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: Fixed -body: 'Overrides on columns whose SQL type the plugin does not recognise are passed to the driver unconverted, so their Python type is now included in `QueryResultsArgsType`; previously pyright strict rejected such a value as a `:many` query parameter. Types used only as parameter annotations also stay lazy instead of being forced into a runtime import.' -time: 2026-07-20T21:00:00.0000000Z -custom: - Author: Rayakame - PR: "185" diff --git a/.changes/unreleased/Fixed-20260721-210000.yaml b/.changes/unreleased/Fixed-20260721-210000.yaml deleted file mode 100644 index f9f454ef..00000000 --- a/.changes/unreleased/Fixed-20260721-210000.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: Fixed -body: '`sqlc.slice` works on the sqlite drivers: generated functions now expand the `/*SLICE:name*/` placeholder at call time, one `?` per element (`NULL` for an empty sequence, so `IN (NULL)` matches no rows), and unpack the sequence into the positional arguments in SQL text order. Previously the placeholder was left in the SQL and binding the sequence raised `sqlite3.ProgrammingError`. Overridden and converted slice parameters keep their element-wise conversion. On PostgreSQL use `= ANY($1::type[])` instead, which sqlc itself intends there.' -time: 2026-07-21T21:00:00.0000000Z -custom: - Author: Rayakame - PR: "211" diff --git a/.changes/v0.6.0.md b/.changes/v0.6.0.md new file mode 100644 index 00000000..79a7656e --- /dev/null +++ b/.changes/v0.6.0.md @@ -0,0 +1,7 @@ +## v0.6.0 - 2026-07-21 +### Added +* [#186](https://github.com/rayakame/sqlc-gen-better-python/pull/186) Converters: a named pair of your own `to_db` / `from_db` functions that serialize and deserialize a column value, referenced by an override. Overrides could only convert by calling the type itself, which does not work for JSON and similar formats. The functions receive and return the type the column would have had without the override, are never called with `None` (nullable columns stay guarded), and convert list columns element-wise. ([Rayakame](https://github.com/Rayakame)) +* [#208](https://github.com/rayakame/sqlc-gen-better-python/pull/208) Documentation site at https://rayakame.github.io/sqlc-gen-better-python/, with a getting started page, a guide covering configuration, drivers, model types, writing queries, enums, type overrides, converters, working with JSON, docstrings, SQLite type conversion and naming, and a reference for every configuration option, the SQL to Python type mappings of both engines and per-driver feature support. Every generated code example is taken from the committed test fixtures. The README now links to the site instead of documenting each feature inline. ([Rayakame](https://github.com/Rayakame)) +### Fixed +* [#185](https://github.com/rayakame/sqlc-gen-better-python/pull/185) Overrides on columns whose SQL type the plugin does not recognise are passed to the driver unconverted, so their Python type is now included in `QueryResultsArgsType`; previously pyright strict rejected such a value as a `:many` query parameter. Types used only as parameter annotations also stay lazy instead of being forced into a runtime import. ([Rayakame](https://github.com/Rayakame)) +* [#211](https://github.com/rayakame/sqlc-gen-better-python/pull/211) `sqlc.slice` works on the sqlite drivers: generated functions now expand the `/*SLICE:name*/` placeholder at call time, one `?` per element (`NULL` for an empty sequence, so `IN (NULL)` matches no rows), and unpack the sequence into the positional arguments in SQL text order. Previously the placeholder was left in the SQL and binding the sequence raised `sqlite3.ProgrammingError`. Overridden and converted slice parameters keep their element-wise conversion. On PostgreSQL use `= ANY($1::type[])` instead, which sqlc itself intends there. ([Rayakame](https://github.com/Rayakame)) diff --git a/CHANGELOG.md b/CHANGELOG.md index b8b1aab2..18924c64 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ All notable changes to this project will be documented in this file. +## v0.6.0 - 2026-07-21 +### Added +* [#186](https://github.com/rayakame/sqlc-gen-better-python/pull/186) Converters: a named pair of your own `to_db` / `from_db` functions that serialize and deserialize a column value, referenced by an override. Overrides could only convert by calling the type itself, which does not work for JSON and similar formats. The functions receive and return the type the column would have had without the override, are never called with `None` (nullable columns stay guarded), and convert list columns element-wise. ([Rayakame](https://github.com/Rayakame)) +* [#208](https://github.com/rayakame/sqlc-gen-better-python/pull/208) Documentation site at https://rayakame.github.io/sqlc-gen-better-python/, with a getting started page, a guide covering configuration, drivers, model types, writing queries, enums, type overrides, converters, working with JSON, docstrings, SQLite type conversion and naming, and a reference for every configuration option, the SQL to Python type mappings of both engines and per-driver feature support. Every generated code example is taken from the committed test fixtures. The README now links to the site instead of documenting each feature inline. ([Rayakame](https://github.com/Rayakame)) +### Fixed +* [#185](https://github.com/rayakame/sqlc-gen-better-python/pull/185) Overrides on columns whose SQL type the plugin does not recognise are passed to the driver unconverted, so their Python type is now included in `QueryResultsArgsType`; previously pyright strict rejected such a value as a `:many` query parameter. Types used only as parameter annotations also stay lazy instead of being forced into a runtime import. ([Rayakame](https://github.com/Rayakame)) +* [#211](https://github.com/rayakame/sqlc-gen-better-python/pull/211) `sqlc.slice` works on the sqlite drivers: generated functions now expand the `/*SLICE:name*/` placeholder at call time, one `?` per element (`NULL` for an empty sequence, so `IN (NULL)` matches no rows), and unpack the sequence into the positional arguments in SQL text order. Previously the placeholder was left in the SQL and binding the sequence raised `sqlite3.ProgrammingError`. Overridden and converted slice parameters keep their element-wise conversion. On PostgreSQL use `= ANY($1::type[])` instead, which sqlc itself intends there. ([Rayakame](https://github.com/Rayakame)) + ## v0.5.1 - 2026-07-20 ### Added * [#177](https://github.com/rayakame/sqlc-gen-better-python/pull/177) CI now runs the Go test suite and golangci-lint on every pull request, so the Go checks are no longer local-only conventions. ([Rayakame](https://github.com/Rayakame)) diff --git a/internal/config/constants.go b/internal/config/constants.go index 0e2ca285..e2164a61 100644 --- a/internal/config/constants.go +++ b/internal/config/constants.go @@ -2,7 +2,7 @@ package config import "fmt" -const PluginVersion = "v0.5.1" +const PluginVersion = "v0.6.0" type ( SQLDriver string