New Features
-
Model#validate! has been added, which performs the same validation performed by save. This is useful in the case where you want to separate the validation and persistance parts of save, so you can add logic in between:
model.validate! # do something with model model.save(validate: false)
-
A virtual_row_core_refinements extension has been added, which enables use of the core refinements inside virtual row blocks. This requires Ruby 4.1+, as it depends on Proc#refined.
-
On SQLite 3.53+,
Sequelnow avoids duplicating the table when adding or dropping CHECK or NOT NULL constraints. -
Database#wait_for_lsn has been added on PostgreSQL 19+ to support WAIT FOR LSN.
Other Improvements
-
Sequelnow uses the proleptic gregorian calendar when creating Date and DateTime instances. This is the calendar that Ruby’s Time uses, as well as the calendar used by most SQL databases.
Deprecations
-
Model#checked_save_failure and raise_on_failure? have added keyword arguments and deprecated the use of a positional options hash. Support for positional hashes will be removed in
Sequel6.
Backwards Compatibility
-
Model#save no longer passes the received hash to internal methods such as _valid? and checked_save_failure, as it now only passes the validate keyword to _valid? and the raise_on_failure keyword to checked_save_failure and raise_on_failure?.