Repository navigation
v0.26.0
Fixed
- Schema/query mismatch now surfaces as
TableNotFoundinstead of
the misleadingParameterTypeNotInferred"use CAST(?) AS INTEGER"
hint. When a query references a table not inschema.sql,
oaspec generatepreviously failed type inference for the
WHERE-clause placeholder ("could not infer type for parameter ?N")
with a CAST suggestion that does not actually fix the underlying
problem. The analyzer now checks every table the query references
against the catalog before parameter inference runs and reports the
first missing table name. Covers SELECT (FROM/JOIN), INSERT INTO,
UPDATE, and DELETE; UnstructuredStatement (parser-internal fallback
for shapes the IR does not yet model) keeps the original behavior
to avoid false positives. (#557) sqlode initstub schema now addsDEFAULT CURRENT_TIMESTAMPto
created_at(across SQLite / MySQL / PostgreSQL templates) so the
documentedinit → generate → gleam runhappy path actually inserts
one row. Previously the stub schema declared
created_at TEXT NOT NULL(or DATETIME / TIMESTAMP) without a default
while the stubCreateAuthorquery only setnameandbio— the
first call to the generatedcreate_authorfailed with a
ConstraintNotnullviolation. AddingDEFAULT CURRENT_TIMESTAMP
matches the column's intent (filled by the database, not the
application) and is uniform across the three engines. (#558)sqlode initlog indent: the first "Created …" line now uses the
same two-space indent as the schema/query lines below it, so the three
paths align in the user's terminal. (#558)
Install
Download the sqlode escript below and place it on your PATH.
Requires Erlang/OTP runtime.
chmod +x sqlode
./sqlode generate --config=sqlode.yaml