The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Added convenience functions to
select
module to select columns by col names:select_cols
replace_select_cols
select_col
replace_select_col
- Replaced dev/test and adapter target
gleam_pgo
withpgo
dependency. - Updated demos.
- [BREAKING]: Renamed
select.offset
function'soffst
label tooffset
- Updated test runner to target lowest and highest erlang and gleam versions
supported:
- Lowest is at the moment Erlang/OTP 26 and Gleam 1.4
- Updated dependencies
- Fixed typos
- Improved Readme
- Breaking changes:
- Renamed
cake.cake_read_query
tocake.to_read_query
- Renamed
cake.cake_write_query
tocake.to_write_query
- Renamed
cake.cake_query_to_prepared_statement
tocake.to_prepared_statement
- Renamed
- Consistent dialect function names across all 4 RDMBS, fixed/renamed functions:
postgres_dialect/read_cake_query_to_prepared_statement
=>postgres_dialect/cake_query_to_prepared_statement
postgres_dialect/query_to_prepared_statement
=>postgres_dialect/read_query_to_prepared_statement
sqlite_dialect/read_cake_query_to_prepared_statement
=>sqlite_dialect/cake_query_to_prepared_statement
sqlite_dialect/query_to_prepared_statement
=>sqlite_dialect/read_query_to_prepared_statement
- Note that while this a breaking change, the compiler will complain and the fix is trivial.
- Fix gleam min version to 1.3.0 to enable
gleam add cake@1
to work.
- Added
join.left_lateral
andjoin.inner_lateral
andjoin.cross_lateral
supportLATERAL JOIN
s available on 🐘PostgreSQL 9.3+ and recent 🐬MySQL versions. Notice: You may also useLATERAL
literally to prefix table names inFROM
clauses with multiple tables.
- Breaking but very small bug fix change:
insert.on_columns_conflict_ignore
specifies its column list via thecolumns
label instead ofcolumn
label.
- 1.0.0 stable release
insert.on_columns_conflict_update
change thecolumn
label tocolumns
.- Added
UPDATE
demo. - Added
INSERT ON CONFLICT UPDATE
demo. - Added
SELECT
withJOIN
demo. - Added a demo using
Fragment
andPreparedStatement
. - Added more public utility functions to the
fragment
module. - Removed glacier dev-dependency to speed up compilation.
- Moved demo apps into sub dir.
- Fixed a few path bugs in docs.
In the wake of making this library less verbose and more consistent be aware about a few slight breaking changes around mostly inserts, updates and deletes.
- Renamed
caster
argument toencoder
within moduleinsert
. - Renamed a lot of public function args to be consistent across the library.
- Added
INSERT
demo. - Added
DELETE
demo. - Changed insert param generation to automatically wrap.
- Changed update param functions to automatically wrap. Renamed them slightly.
- Added more utility to the
where
module, such aswhere.none
,where.true
andwhere.false
. - Fixed unit tests around
INSERT...ON CONFLICT...UPDATE
withWHERE
clause. - Renamed
update.set_many_to_expression
toupdate.sets_to_expression
andupdate.set_many_to_sub_query
toupdate.sets_to_sub_query
. - Renamed
union_many
tounions
,union_all_many
tounions_all
,except_many
toexcepts
,except_all_many
toexcepts_all
, andintersect_many
tointersects
,intersect_all_many
tointersects_all
in modulecombined
. - Made
where.similar_to
escape_char
an argument.
- Added
where.in_query
which allows to use a sub-query as the right hand side of anIN
clause. - Added
where.sub_query
which allows to use a sub-query as aWhereValue
.
-
Re-export types which can be used in public APIs, this should hopefully close the last gaps to never be required to use
cake/internal/*
modules.In case you are tempted to do so, please get in touch to see what we can do about it.
- Renamed
Query
and the internal query module toReadQuery
andread_query
. - Fixed some issues around upserts (INSERT ON CONFLICT UPDATE).
- Moved internal/params module into public namespace.
- Rename dialects such as
postgres
topostgres_dialect
. - Fix demos and tests to use public APIs instead of internal ones.
- Provide public API to access the generated SQL and prepared statement
parameters in the base
cake
and newdialect
modules.
- Added more more applications.
- Added tests and snapshots for upserts.
- Fix test suite.
- Improved documentation.
- Added demo app abstraction.
- Added first runnable demo for
SELECT
and decode.
- Flattened the query interface/DSL modules into the base namespace of
cake/
. - Moved some modules only used internally into
cake/internal/
namespace. - Fixed and improved test suite for
DELETE
statements. - Improved general documentation.
- Improved builder flexibility for inserts and updates.
- Added documentation for the
insert
,update
anddelete
interface modules. - Improved tests for
UPDATE
. - Renamed
select.groups_by
toselect.group_bys
. - Fixed bugs when updating with sub-queries, where specifying a sub_query while setting update columns to vales would remove all other settings.
- Added 🐬MySQL independent of 🦭MariaDB as first class supported.
- Fixed github CI and docker compose testing against 🐘PostgreSQL and 🦭MariaDB.
- Locally you should be able to install docker and then just run:
bin/docker/detached/
and thengleam test
. - Relaxed licence from AGPL 3.0 to Mozilla Public License 2.0 (MPL-2.0).
- Added support for deletes and interface modules
for
insert
,update
,delete
ontop of the existingselect
andcombined
interface modules. - Added support for 🦭MariaDB and 🐬MySQL.
- Removed the hard dependency on any RDMBS specific
library. These are now only required when developing and testing
this library, but when running you can chose any of the following adapters:
pog
sqlight
gmysql
- Fixes around inserts, updates, moved a lot of deps to dev deps.
- A lot of polishing, support for inserts and updates.
- First preview / demo.