Skip to content

v0.35.0

Choose a tag to compare

@github-actions github-actions released this 19 Nov 06:10
· 17 commits to main since this release
4e03642

Removed

  • The sqlode/cli module is no longer part of the documented API on HexDocs. It builds the command-line parser of the sqlode executable and was not meant to be imported; Hex lists no package that depends on sqlode. sqlode/runtime, which generated code imports, is unchanged.

Fixed

  • A table named only inside a subquery no longer makes an unqualified column of the outer query ambiguous. SELECT id, (SELECT COUNT(*) FROM posts WHERE posts.author_id = authors.id) AS post_count FROM authors and SELECT name FROM authors WHERE id > $1 AND EXISTS (SELECT 1 FROM posts WHERE ...) stopped generate with column "id" is ambiguous (SQD4008) because posts also has an id. The outer id now resolves to authors.id. Joined tables that share a column name are still ambiguous.
  • A literal IN list with more than one placeholder, WHERE id IN (?, ?, ?) or WHERE id NOT IN ($1, $2), stopped generate with could not infer type for parameter $1 unless every placeholder was cast. Each placeholder of the list now takes the column's type, as a single IN ($1) already did.
  • sqlode --help and the help of init, generate and verify printed their examples as one run-on line (Examples: sqlode init sqlode init --output=./config/sqlode.yaml sqlode) and ran the paragraphs together. Each example is on its own line now, with a blank line between paragraphs.

Install

Download the sqlode escript below and place it on your PATH.
Requires Erlang/OTP runtime.

chmod +x sqlode
./sqlode generate --config=sqlode.yaml

SHA256SUMS is signed with cosign (SHA256SUMS.sigstore.json), and SLSA provenance is attached. See "Verifying release integrity" in the README.