Releases: nao1215/sqlode
Releases · nao1215/sqlode
v0.1.0
Added
- Initial sqlc-style code generator for Gleam
- PostgreSQL, MySQL, and SQLite engine support
- Query annotations
:one,:many,:exec,:execresult,:execrows,:execlastidsupported end-to-end.:batchone,:batchmany,:batchexec, and:copyfromare parsed for sqlc compatibility but currently fail generation with an unsupported-annotation error. - sqlode macros:
sqlode.arg,sqlode.narg,sqlode.slice,sqlode.embed - Type mapping for INT, FLOAT, BOOL, TEXT, BYTEA, UUID, JSON, TIMESTAMP, DATE, TIME
- PostgreSQL ENUM type support
- Nullable column detection with
Option(T)wrapping - Result record types (
models.gleam) for:oneand:manyqueries - Adapter generation for pog (PostgreSQL) and sqlight (SQLite)
- RETURNING clause support for INSERT/UPDATE/DELETE
- CTE (WITH clause) support
- JOIN type inference
- Type overrides and column renames via config
initcommand with stubdb/schema.sqlanddb/query.sqlcreationgeneratecommand with--configflag- Version constant in
version.gleamas single source of truth
Install
Download the sqlode escript below and place it on your PATH.
Requires Erlang/OTP runtime.
chmod +x sqlode
./sqlode generate --config=sqlode.yaml