File: 4.20.0.txt

package info (click to toggle)
ruby-sequel 5.63.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 10,408 kB
  • sloc: ruby: 113,747; makefile: 3
file content (79 lines) | stat: -rw-r--r-- 3,350 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
= New Features

* A :before_retry option has been added to Database#transaction, which
  specifies a proc to call when retrying if the :retry_on option
  is used.  This can be used to implement additional logging, sleeping
  between retries, or other things.

* The to_json method :root option in the json_serializer plugin can now
  be a string value to specify the name for the object key, instead of
  using the underscored model name.

* Dataset#paged_each now returns an enumerator if not passed a block.

* You can now set the :instance_specific association option to false.
  Previously, it was automatically set to true in some cases.  If you
  know the association does not depend on anything instance-specific
  other than the foreign/primary key, setting this option can allow
  Sequel to perform some additional optimizations.

= Other Improvements

* Eager loading queries are now skipped if there are no matching keys.
  There was code to check this previously, but it was accidently
  removed in an earlier refactoring.

* Eager loading an association with a limit and an eager block and
  cascaded associations now works correctly when the window_function
  limit strategy is used (the default on databases that support
  window functions).

* Eager loading an association with a limit with an eager block now
  works correctly on databases do not support window functions but do
  support correlated subqueries.

* The parent association is now set on associated objects when loading
  descendants in the rcte_tree plugin.  This allows the parent method
  on any of the descendants to work without issuing a database query.

* The prepared_statements_associations plugin now only uses prepared
  statements if association metadata is being cached.  Previously, it
  would use prepared statements even if association metadata was not
  cached, which could leak the prepared statements.

* Model#dup now duplicates the associations hash for the object.

* Model#freeze no longer validates an object if the the errors for the
  object are already frozen.  The static_cache plugin now freezes the
  errors before freezing the object, so that it doesn't validate the
  object.  This can skip many database queries when the
  auto_validations plugin is used and there is a unique constraint or
  index on the related table.

* AUTOINCREMENT is now used again on SQLite by default for primary
  keys.  It was removed when :auto_increment was added to the schema
  hashes, but the removal changed SQLite's behavior.  This restores
  the previous behavior.

* Microsoft SQL Server's bit type is now recognized as a boolean type
  by the schema dumper.

* The pg_enum extension's create_enum method can now be used in
  reversible migrations.

* set_column_type with the :auto_increment=>true option once again
  works on MySQL.  It had been broken since Sequel started adding
  :auto_increment to the schema hashes.

* The mysql2 adapter now recognizes the :charset option as a synonym
  for :encoding.

* The swift adapter now respects database and application timezone
  settings.

= Backwards Compatibility

* AssociationReflection#apply_ruby_eager_limit_strategy no longer
  checks that the strategy is :ruby, callers are now expected to
  check the value themselves.  This should only matter if you are
  using custom association types.