Skip to content

Commit

Permalink
Bump version to 5.88.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyevans committed Jan 1, 2025
1 parent 530eae6 commit d0504ef
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
=== master
=== 5.88.0 (2025-01-01)

* Add subset_static_cache plugin for statically caching subsets of a model class (jeremyevans)

Expand Down
55 changes: 55 additions & 0 deletions doc/release_notes/5.88.0.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
= New Features

* A subset_static_cache plugin has been added, for statically caching
subsets of a model class. This is useful for cases where only a
subset of the model class is static. For example, with this code:

class StatusType < Sequel::Model
dataset_module do
where :available, hidden: false
end
cache_subset :available
end

The following methods will use the cache and not issue a database
query:

* StatusType.available.with_pk
* StatusType.available.all
* StatusType.available.each
* StatusType.available.first (without block, only supporting no
arguments or single integer argument)
* StatusType.available.count (without an argument or block)
* StatusType.available.map
* StatusType.available.as_hash
* StatusType.available.to_hash
* StatusType.available.to_hash_groups

The static_cache_cache plugin has been updated to statically cache
these subsets, avoiding a query to get the static values when
cache_subset is called.

* On PostgreSQL, column aliases now support data types, which is
useful when selecting from functions returning records, such as
the jsonb_to_record/jsonb_to_recordset function:

DB.from{jsonb_to_recordset(:value).as(:d, [[:a, Integer], [:e, String]])}
# SELECT * FROM jsonb_to_recordset("value") AS "d"("a" integer, "e" text)

= Other Improvements

* Sequel::Model class-level methods that call dataset methods can now
be overridden by defining singleton methods on the class, and using
super to get the default behavior (similar to how column and
association methods work).

* The timestamp migrator now has deterministic behavior when multiple
migrations have the same version, using a lexicographic sort of the
rest of the migration filename to break ties.

* Explicit block parameters are now used in some methods, allowing
the test suite to run without warnings when using
-W:strict_unused_block on Ruby 3.4.

* A consistent instance variable setting order is now used in the
string_agg extension to avoid shape-related performance warnings.
2 changes: 1 addition & 1 deletion lib/sequel/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module Sequel

# The minor version of Sequel. Bumped for every non-patch level
# release, generally around once a month.
MINOR = 87
MINOR = 88

# The tiny version of Sequel. Usually 0, only bumped for bugfix
# releases that fix regressions from previous versions.
Expand Down

0 comments on commit d0504ef

Please sign in to comment.