Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .changes/unreleased/Added-20260720-230000.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions .changes/unreleased/Added-20260721-140000.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions .changes/unreleased/Fixed-20260720-210000.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions .changes/unreleased/Fixed-20260721-210000.yaml

This file was deleted.

7 changes: 7 additions & 0 deletions .changes/v0.6.0.md
Original file line number Diff line number Diff line change
@@ -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))
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion internal/config/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package config

import "fmt"

const PluginVersion = "v0.5.1"
const PluginVersion = "v0.6.0"

type (
SQLDriver string
Expand Down