Repository navigation
Releases
Releases · ygrek/sqlgg
20260721
CHANGES:
- sql: dynamic select, pick which columns to SELECT at runtime (caml only)
- sql: eliminate unused JOINs and subqueries in dynamic select
- ocaml: sqlgg.ppx to map query results to records
- sql: dialect feature checks with -dialect mysql|sqlite|postgresql|tidb
- cli: generate migrations from schema diff (-migrate, -diff)
- sql: custom types for columns via [sqlgg] metadata
- sql: ENUM as polymorphic variants
- sql: BIGINT UNSIGNED as uint64 (requires mariadb > 1.3.0)
- sql: JSON type and functions
- sql: allow to type-annotate parameters with
:: SQLTYPE NULL?to help type-checker - sql: bool choices
{ expr }?and@var? - sql: reusable queries in CTEs, recursive CTEs
- sql: ON CONFLICT DO NOTHING/DO UPDATE, GROUP_CONCAT, ORDER BY in function arguments,
more date and window functions, multi-table UPDATE with ORDER BY and LIMIT,
(a,b) IN @PARAM, CASE as expression, REPLACE, STRAIGHT_JOIN, SET STATEMENT ... FOR,
parametrized ORDER BY and LIMIT, CREATE TYPE, ALTER COLUMN, DROP CHECK, TTL, LOCK
- typing: track nullability
- improve single-row detection using constraints
- ocaml: cache prepared statements per connection
- ocaml: Single module with labeled arguments
20231201
+ ocaml: support IN @x via text substitution
+ sql: support batch insert with syntax INSERT INTO x(...) VALUES @xs
+ sql: rudimentary NULL handling (direct column assignments)
+ sql: multi-table DELETE
+ ocaml: update traits to track read/write nature of ops
* ocaml: cleanup whitespace
* sql: implicitly convert int<->decimal, require explicit cast for float<->decimal
+ sql: more string and window functions
+ sql: CAST, FLOOR, MOD, CONVERT, AS (expr), DROP FOREIGN KEY, ALTER TABLE .. [CONVERT TO] CHARACTER SET .., ALTER TABLE ... ADD CONSTRAINT
* sql: fix table alias handling
+ cli: -static-header
* sql: fix DATE type
* sql: fix ORDER BY with multiple params
20200521
* switch versioning scheme
* switch build system to dune
* sql: EXISTS, nested JOINs, SUBSTRING, DROP VIEW, ALTER RENAME,
RENAME TABLE, DIV, MOD, LAST_INSERT_ID, UNIX_TIMESTAMP(DATE),
TIMESTAMPDIFF, TIMESTAMPADD, DATE, TIME, POW, INSERT DEFAULT
* sql: INSERT scope fixes
* ocaml: monadic IO with `-gen caml_io`
* ocaml: mariadb traits
* ocaml: parameters in callbacks are now named
* sql: variant parameters (ocaml only)
* traits: + Decimal
* typing: rudimentary NULL support
* sql: do not fail on unknown functions (treat as untyped and emit warning)
* gen: allow filtering by DDL, DML, DQL, etc
0.4.5
* improve type resolution for functions
* improve single-row detection
* improve type for numeric expressions a bit
* sql: ANY_VALUE, IS NOT DISTINCT FROM, COUNT(DISTINCT ...), from_unixtime,
IFNULL, NULLIF, multi-value INSERT
* sql: more datetime functions (sqlite)
* caml: generate List module
* forbid `-params none` with autogenerated parameters
* mysql: allow override value types
0.4.4
0.4.3
0.4.2
0.4.1
0.4.0
* sql: many typing improvements
* sql: SELECT FOR UPDATE, ON UPDATE, ON DELETE, ON DUPLICATE KEY UPDATE,
IS NOT? NULL, INTERVAL, CREATE INDEX column(N), VALUES function, UUID,
SELECT IF
* sql: parse stored procedures
* sql: dynamically add functions
* ocaml: support multiple substitutions in queries
* ocaml: install traits and implementations as subpackages