Skip to main content
Version: Next

Marten 0.7.0 release notes

Under development.

Requirements and compatibility

  • Crystal: 1.17, 1.18, and 1.19.
  • Databases:
    • MariaDB 10.5 and higher.
    • MySQL 8.0.11 and higher.
    • PostgreSQL 14 and higher.
    • SQLite 3.31.0 and higher.

New features

Minor features

Models and databases

  • Query sets now provide a #limit method and an #offset method. Those methods respectively allow to limit the number of records returned and to offset the records returned. They act as aliases for the #[] method with a range.
  • The #update query set method can now be called on model classes directly, thus allowing to update all the records of the considered model with the specified values.
  • It is now possible to update only specific columns without running validations or callbacks for a model record by using the #update_columns method.
  • It is now possible to easily create or update records in a single call by using the #update_or_create query set method. An #update_or_create! variant is also available for the same purpose, but it raises in case updated/created records are invalid.

Handlers and HTTP

Templates

  • Most informational string properties (such as #ascii_only?, #blank?, #bytesize, #empty?, #size, and #valid_encoding?) are now available as template attributes for string values and safe string values.

Development