All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]
[0.4.0] — 2026-07-27
Added
mix squirrelix.gen --watchwatches{lib,test,dev}/**/sql/*.sqland regenerates on change (same query source / connection options as a one-shot gen; Ctrl-C to stop). Linux needsinotify-tools.--write-metadata PATHonmix squirrelix.gen/mix squirrelix.check(requires--infer) exports a reloadable metadata file for offline check/codegen without Postgres.- Broader structural parameter naming beyond
INSERT: comparison operators (<>,!=,<,>,<=,>=),LIKE/ILIKE(includingNOT), andSET (columns) = (...)/ROW(...)lists (includingON CONFLICT ... DO UPDATE SET). Comparison/equality names still win over column-list inference; existingUPDATE ... SET col = $nandINSERT (cols) VALUESnaming are unchanged. - Phoenix + CI cookbook guide (
guides/phoenix.md) for Mix adoption: migrate-then-gen/check,DATABASE_URL, Mix aliases, CI check jobs, and intentional Ecto coexistence.
[0.3.0] — 2026-07-27
Added
- Generated soft companions (
<name>_ok/arity) viaPostgrex.query/3that return{:ok, result} | {:error, Exception.t()}without raising. Soft command companions return{:ok, num_rows}(affected-row count). The raisingquery!API is unchanged (additive, not breaking). See Writing Queries and Getting Started guides. - Parameter name inference from
INSERT ... (columns) VALUES (...)placeholders (equality /UPDATE ... SETnaming unchanged; equality wins on conflicts). --inferhonorsDATABASE_URLwith documented precedence: flags →--url→DATABASE_URL→PG*→ defaults. URL/PGSSLMODEsslmode(andssl=true/ssl=false) map into Postgrex:ssloptions.
Changed
- Project-wide atomic codegen (Gleam squirrel 4.5+ parity): if any
sql/directory has query errors,mix squirrelix.gen/Squirrelix.generate/3write nothing.mix squirrelix.checkfails globally when any directory has errors or drift.
[0.2.0] — 2026-07-27
Added
- Nullability inference for schema-qualified tables, scalar subqueries in select lists, and expression-derived columns (see Writing Queries guide).
- Structured errors for
--inferconnection failures and timeouts (CannotConnectToPostgres,PostgresConnectionTimeout) with actionable hints forPG*env vars, CLI flags, and metadata-file fallback.
Changed
- Documented composite-type policy as reject-with-hints (aligned with Gleam
Squirrel and flat Elixir row maps). Inference now attaches actionable hints for
composites (
kind: "c") and geometricpointvalues. - Finalized unsupported-type policy for Postgres ranges/multiranges and remaining
built-ins (
interval, geometric, network,money, and related types): inference rejects them with actionable hints, and the Types guide documents workarounds.
[0.1.0] — 2026-07-24
Added
- First public release of Squirrelix (Hex package
squirr_elix): typed Elixir query modules from plain.sqlfiles via Postgres inference or metadata. - Mix tasks
mix squirrelix.genandmix squirrelix.check. - Guides for getting started, writing queries, types, and configuration.
- GitHub Actions CI (format, compile, Credo, tests with Postgres 16) and Hex publish
on
v*tags.
Changed
- Public Elixir modules and Mix tasks use the Squirrelix name (package/app remain
squirr_elix). Repository:scripthungry/squirrelix.
Security
- Generated SQL and
@docstrings are embedded withinspect/2so#{}in.sqlfiles cannot become Elixir interpolation in generated modules.