| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| README.md | 2023-06-05 | 4.5 kB | |
| Release 0.13.0.tar.gz | 2023-06-05 | 255.2 kB | |
| Release 0.13.0.zip | 2023-06-05 | 402.8 kB | |
| Totals: 3 Items | 662.4 kB | 0 | |
Release notes
General
- address "positional parameter of the overridden method, which has a different name and may affect named argument passing" crystal
1.5.0warning (for full list see MR) - upgrade supported mysql driver version to
0.14.0 - upgrade supported pg driver version to
0.26.0 - add
jsonbtype support for model and migration generators - replace
phoffer/inflector.crinflector library withluckyframework/wordsmith
QueryBuilder
Query.countreturnsInt64instead ofInt32Query.offsetacceptsInt32orInt64as input instead of onlyInt32#group,#selectraise anArgumentErrorif block returns anything except array#having,#reorder,#orderraisesExpressionBuilderas a block argument#whereaccepts hash with string keys as well- added
#find_or_create_by,#find_or_create_by!,#find_or_initialize_byto create/instantiate a record if nothing was found in the DB - added
#find_byand#find_by!as a shortcut for.where().firstand.where().first!
Model
- change default
idattribute type fromInt32toInt64 - generate a setter method for a
Int64attribute that calls#to_i64onInt32value - in mapping automatically assign
null: trueifnullproperty is missing and field is primary - enhance type coercion on initializing instance from hash
- change return type of
.idstoArray(Int64) Model.countreturnsInt64instead ofInt32- add support for
JSON::PullParserattribute class - model class responds to:
#here,#select,#from,#union,#distinct,#order,#group,#with,#merge,#limit,#offset,#lock,#reorder,#count,#max,#min,#sum,#avg,#group_count,#group_max,#group_min,#group_sum,#group_avg,#with_relation,#includes,#preload,#eager_load,#last,#last!,#first,#first!,#find_by,#find_by!,#pluck,#exists?,#increment,#decrement,#ids,#find_records_by_sql,#find_in_batches,#find_each,#join,#right_join,#left_join,#lateral_join - adds
.createand.create!that accepts block - fix a bug when password digest wasn't generated when password was set by passing it to a constructor
- add missing STI initialization to constructors accepting a hash or named tuple
- use
Adapter::Base.coerce_database_valuein constructors accepting a hash or named tuple to coerce values for columns that don't have specified converter - Fix the issue of
Jennifer::Model::OptimisticLocking#reset_lock_versiondecreasing lock version column when it's not changed
Validation
- add
jennifer.errors.messages.requiredmessage in locale yaml file Jennifer::Model::Errors#addacceptsString | Symbol | Proc(Translation, String, String)formessageargumentvalidates_inclusion,validates_exclusion,validates_format,validates_length,validates_uniqueness,validates_presence,validates_absence,validates_numericality,validates_acceptance&validates_confirmationvalidation macros acceptsmessageoption that allows to specify validation message
Relation
belongs_torelation macro acceptsrequiredoption to validate existence of relation on save
View
- model class responds to:
#here,#select,#from,#union,#distinct,#order,#group,#with,#merge,#limit,#offset,#lock,#reorder,#count,#max,#min,#sum,#avg,#group_count,#group_max,#group_min,#group_sum,#group_avg,#with_relation,#includes,#preload,#eager_load,#last,#last!,#first,#first!,#find_by,#find_by!,#pluck,#exists?,#increment,#decrement,#ids,#find_records_by_sql,#find_in_batches,#find_each,#join,#right_join,#left_join,#lateral_join
Adapter
- remove
idcolumn from theversionstable schema - change default
idcolumn type frominttobigint - add
Base.coerce_database_valuemethod to provide interface to perform coercing from default database type used to read column to hash to a desired model attribute type
SqlGenerator
- fix invalid SQL generating for
FROMclause when string value is given for#from
Record
- now calling a
#foo_barmethod on a record that is missing raisesArgumentErrorinstead ofKeyError