v0.1.0-alpha.2 — atomic /batch, native PG arrays, @transactional marker, Java-compat
Pre-releaseSecond pre-release of Resql — significant correctness + compatibility improvements over alpha.1.
Images
Multi-arch (linux/amd64, linux/arm64), cosign-signed keyless via GHA OIDC.
docker.io/turnerrainer/resql:0.1.0-alpha.2(pinned)docker.io/turnerrainer/resql:alpha(rolling — moves forward with each alpha)ghcr.io/turnerrainer/resql:0.1.0-alpha.2ghcr.io/turnerrainer/resql:alpha
Manifest digest: sha256:ee5b85d93786c1c1107a1d465587a8d9449f1cc1adbfea651870a52f97546f1e
Headline changes
/batch is now atomic (task 007)
The batch endpoint runs all iterations inside one database transaction. Any failure rolls the entire batch back — no partial writes. Missing-parameter checks run against every set BEFORE the transaction opens for fail-fast.
# If iteration 2 violates a UNIQUE constraint, iterations 1 AND 3 are rolled back too.
curl -X POST http://localhost:8080/crm/users/create/batch \
-H 'content-type: application/json' \
-d '{\"queries\":[{\"login\":\"a\"},{\"login\":\"a\"},{\"login\":\"c\"}]}'
# → 400; subsequent SELECT sees zero of these rows.Native Postgres array binding (task 007)
Homogeneous scalar JSON arrays now bind as native Postgres arrays (text[], int8[], float8[], bool[]) so a single SQL statement using unnest() handles the whole set in one round-trip.
-- one INSERT, N rows
INSERT INTO audit_log (actor, action)
SELECT unnest(:actors), unnest(:actions) RETURNING id;Nulls inside a homogeneous array become SQL NULL elements. Mixed / nested / all-null / empty arrays fall back to JSONB. SQLite continues to bind arrays as JSON strings — use json_each() to unpack.
-- @transactional marker (task 003)
Any SQL file whose leading comment block contains -- @transactional now executes inside a transaction (commit on success, rollback on error). Applies to GET + POST; primary use is multi-statement POST files.
-- @transactional
INSERT INTO audit_log (actor, action) VALUES (:actor, :action);
UPDATE users SET last_seen = now() WHERE id = :user_id;Java Resql compatibility layer
- Reads Java-shape config files (
application.yml,application-{prod,dev,test}.yml) at boot, translates Spring keys to Resql config, and logs diagnostics for anything unsupported. - Auto-discovers
/app/resql.yaml,./resql.yaml,./application*.ymlat boot — first hit wins. /healthand/datasourcesresponses now use Java-canonical field names (jdbcUrl,driverClassName,packagingTime) so existing Spring-era dashboards keep working. Note:/health.versionisv{MAJOR}.{MINOR}.{PATCH}(pre-release metadata stripped) to match Java'sHeartBeatService; distinguish alpha releases via the Docker image tag.
Coverage
144 tests pass (up from 133 in alpha.1) — 76 unit + 68 integration including 24 Postgres integration tests exercising the new atomicity + array binding + transactional-marker paths.
Docs
- New sections in Writing SQL endpoints: atomicity guarantee, native array parameters,
@transactionalmarker. - New rollback entries in Failure modes.
- New audit + porting docs covering the Java-compat divergence catalog.
Full changelog
https://github.com/turnerrainer/Resql/blob/dev/CHANGELOG.md#0102---2026-08-05
Known limitations (still)
- No OpenTelemetry export — see backlog task 004.
- No MySQL driver — see backlog task 005.
?mode=bulkrouting skipped as under-specified; native array binding covers the single-round-trip pattern. Detail in tasks/done/007.