jennifer v0.12.0 Release Notes
Release Date: 2021-12-15 // almost 2 years ago-
General
- โ add crystal 1.2.0 support
QueryBuilder
#pluck
accepts splatted named tuple of desired attribute-type pairs and returns array of such tuples as a records- ๐
#upsert
passes expression builder as a block argument
Model
- add Optimistic locking support via macro
with_optimistic_lock(column_name = lock_version)
updated_at
andcreated_at
fields aren't override on save if have been set manually- โ add
upsert
class method to insert multiple models while ignoring conflicts on specified unique fields
Adapter
- ๐ fix database connection query arguments building
- each adapter includes
RequestMethods
instead of including it by base adapter class - โ add a new
upsert
overload that allows passing a collection ofJennifer::Model::Base
- fix
insert_on_duplicates
sql generation for postgres adapter if no unique fields given
SqlGenerator
- โก๏ธ any
INSERT
,UPDATE
,SELECT
andDELETE
requests uses quoted tables/columns if they are created byQueryBuilder::ExpressionBuilder
(raw SQL is placed as-is) .select_clause
uses specified query attributes to select and fall back to custom fields only if there is no custom attribute to select
Migration
TableBuilder::ChangeTable
now performsDropForeignKey
,DropIndex
&DropReference
before any column manipulation- ๐ fix
TableBuilder::ChangeEnum
to use specified adapter to query effected tables
Previous changes from v0.11.1
-
General
- switch to the
crimson-knight/i18n.cr
~> 0.4.1
Migration
- ๐ fix
TableBuilder::ChangeTable#drop_reference
dropping column before reference - โ add
TableBuilder::DropReference
- switch to the