sequel 5.83.0 → 5.84.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. data/lib/sequel/adapters/shared/sqlite.rb +3 -1
  3. data/lib/sequel/database/connecting.rb +1 -1
  4. data/lib/sequel/database/misc.rb +8 -3
  5. data/lib/sequel/database/schema_methods.rb +2 -0
  6. data/lib/sequel/extensions/pg_json_ops.rb +328 -1
  7. data/lib/sequel/sql.rb +8 -5
  8. data/lib/sequel/version.rb +1 -1
  9. metadata +2 -236
  10. data/CHANGELOG +0 -1393
  11. data/README.rdoc +0 -936
  12. data/doc/advanced_associations.rdoc +0 -884
  13. data/doc/association_basics.rdoc +0 -1859
  14. data/doc/bin_sequel.rdoc +0 -146
  15. data/doc/cheat_sheet.rdoc +0 -255
  16. data/doc/code_order.rdoc +0 -104
  17. data/doc/core_extensions.rdoc +0 -405
  18. data/doc/dataset_basics.rdoc +0 -96
  19. data/doc/dataset_filtering.rdoc +0 -222
  20. data/doc/extensions.rdoc +0 -77
  21. data/doc/fork_safety.rdoc +0 -84
  22. data/doc/mass_assignment.rdoc +0 -98
  23. data/doc/migration.rdoc +0 -660
  24. data/doc/model_dataset_method_design.rdoc +0 -129
  25. data/doc/model_hooks.rdoc +0 -254
  26. data/doc/model_plugins.rdoc +0 -270
  27. data/doc/mssql_stored_procedures.rdoc +0 -43
  28. data/doc/object_model.rdoc +0 -563
  29. data/doc/opening_databases.rdoc +0 -439
  30. data/doc/postgresql.rdoc +0 -611
  31. data/doc/prepared_statements.rdoc +0 -144
  32. data/doc/querying.rdoc +0 -1070
  33. data/doc/reflection.rdoc +0 -120
  34. data/doc/release_notes/5.0.0.txt +0 -159
  35. data/doc/release_notes/5.1.0.txt +0 -31
  36. data/doc/release_notes/5.10.0.txt +0 -84
  37. data/doc/release_notes/5.11.0.txt +0 -83
  38. data/doc/release_notes/5.12.0.txt +0 -141
  39. data/doc/release_notes/5.13.0.txt +0 -27
  40. data/doc/release_notes/5.14.0.txt +0 -63
  41. data/doc/release_notes/5.15.0.txt +0 -39
  42. data/doc/release_notes/5.16.0.txt +0 -110
  43. data/doc/release_notes/5.17.0.txt +0 -31
  44. data/doc/release_notes/5.18.0.txt +0 -69
  45. data/doc/release_notes/5.19.0.txt +0 -28
  46. data/doc/release_notes/5.2.0.txt +0 -33
  47. data/doc/release_notes/5.20.0.txt +0 -89
  48. data/doc/release_notes/5.21.0.txt +0 -87
  49. data/doc/release_notes/5.22.0.txt +0 -48
  50. data/doc/release_notes/5.23.0.txt +0 -56
  51. data/doc/release_notes/5.24.0.txt +0 -56
  52. data/doc/release_notes/5.25.0.txt +0 -32
  53. data/doc/release_notes/5.26.0.txt +0 -35
  54. data/doc/release_notes/5.27.0.txt +0 -21
  55. data/doc/release_notes/5.28.0.txt +0 -16
  56. data/doc/release_notes/5.29.0.txt +0 -22
  57. data/doc/release_notes/5.3.0.txt +0 -121
  58. data/doc/release_notes/5.30.0.txt +0 -20
  59. data/doc/release_notes/5.31.0.txt +0 -148
  60. data/doc/release_notes/5.32.0.txt +0 -46
  61. data/doc/release_notes/5.33.0.txt +0 -24
  62. data/doc/release_notes/5.34.0.txt +0 -40
  63. data/doc/release_notes/5.35.0.txt +0 -56
  64. data/doc/release_notes/5.36.0.txt +0 -60
  65. data/doc/release_notes/5.37.0.txt +0 -30
  66. data/doc/release_notes/5.38.0.txt +0 -28
  67. data/doc/release_notes/5.39.0.txt +0 -19
  68. data/doc/release_notes/5.4.0.txt +0 -80
  69. data/doc/release_notes/5.40.0.txt +0 -40
  70. data/doc/release_notes/5.41.0.txt +0 -25
  71. data/doc/release_notes/5.42.0.txt +0 -136
  72. data/doc/release_notes/5.43.0.txt +0 -98
  73. data/doc/release_notes/5.44.0.txt +0 -32
  74. data/doc/release_notes/5.45.0.txt +0 -34
  75. data/doc/release_notes/5.46.0.txt +0 -87
  76. data/doc/release_notes/5.47.0.txt +0 -59
  77. data/doc/release_notes/5.48.0.txt +0 -14
  78. data/doc/release_notes/5.49.0.txt +0 -59
  79. data/doc/release_notes/5.5.0.txt +0 -61
  80. data/doc/release_notes/5.50.0.txt +0 -78
  81. data/doc/release_notes/5.51.0.txt +0 -47
  82. data/doc/release_notes/5.52.0.txt +0 -87
  83. data/doc/release_notes/5.53.0.txt +0 -23
  84. data/doc/release_notes/5.54.0.txt +0 -27
  85. data/doc/release_notes/5.55.0.txt +0 -21
  86. data/doc/release_notes/5.56.0.txt +0 -51
  87. data/doc/release_notes/5.57.0.txt +0 -23
  88. data/doc/release_notes/5.58.0.txt +0 -31
  89. data/doc/release_notes/5.59.0.txt +0 -73
  90. data/doc/release_notes/5.6.0.txt +0 -31
  91. data/doc/release_notes/5.60.0.txt +0 -22
  92. data/doc/release_notes/5.61.0.txt +0 -43
  93. data/doc/release_notes/5.62.0.txt +0 -132
  94. data/doc/release_notes/5.63.0.txt +0 -33
  95. data/doc/release_notes/5.64.0.txt +0 -50
  96. data/doc/release_notes/5.65.0.txt +0 -21
  97. data/doc/release_notes/5.66.0.txt +0 -24
  98. data/doc/release_notes/5.67.0.txt +0 -32
  99. data/doc/release_notes/5.68.0.txt +0 -61
  100. data/doc/release_notes/5.69.0.txt +0 -26
  101. data/doc/release_notes/5.7.0.txt +0 -108
  102. data/doc/release_notes/5.70.0.txt +0 -35
  103. data/doc/release_notes/5.71.0.txt +0 -21
  104. data/doc/release_notes/5.72.0.txt +0 -33
  105. data/doc/release_notes/5.73.0.txt +0 -66
  106. data/doc/release_notes/5.74.0.txt +0 -45
  107. data/doc/release_notes/5.75.0.txt +0 -35
  108. data/doc/release_notes/5.76.0.txt +0 -86
  109. data/doc/release_notes/5.77.0.txt +0 -63
  110. data/doc/release_notes/5.78.0.txt +0 -67
  111. data/doc/release_notes/5.79.0.txt +0 -28
  112. data/doc/release_notes/5.8.0.txt +0 -170
  113. data/doc/release_notes/5.80.0.txt +0 -40
  114. data/doc/release_notes/5.81.0.txt +0 -31
  115. data/doc/release_notes/5.82.0.txt +0 -61
  116. data/doc/release_notes/5.83.0.txt +0 -56
  117. data/doc/release_notes/5.9.0.txt +0 -99
  118. data/doc/schema_modification.rdoc +0 -679
  119. data/doc/security.rdoc +0 -443
  120. data/doc/sharding.rdoc +0 -286
  121. data/doc/sql.rdoc +0 -648
  122. data/doc/testing.rdoc +0 -204
  123. data/doc/thread_safety.rdoc +0 -15
  124. data/doc/transactions.rdoc +0 -250
  125. data/doc/validations.rdoc +0 -558
  126. data/doc/virtual_rows.rdoc +0 -265
@@ -1,31 +0,0 @@
1
- = Improvements
2
-
3
- * Running migrations using one of the included migrators on separate
4
- Database objects in separate threads simultaneously is now
5
- supported. Previously, the migrators were not thread-safe.
6
-
7
- * On Ruby 2.5+, :db_type entries in the schema hashes are now deduped
8
- for a slight memory savings when using many columns with the same
9
- database type.
10
-
11
- * The schema_caching extension now freezes string values in the
12
- resulting hashes, just as the default schema parsing code started
13
- doing in 5.5.0.
14
-
15
- * The schema_caching extension now supports the :callable_default
16
- schema values used by the pg_json, pg_array, and pg_hstore
17
- extensions, by removing the entry before caching and resetting it
18
- after restoring the cache.
19
-
20
- * Identifier mangling rules are now respected when renaming columns on
21
- Microsoft SQL Server.
22
-
23
- = Backwards Compatibility
24
-
25
- * The migrator internals were modified in order to support
26
- thread-safety. The private Migrator#remove_migration_classes
27
- method has been removed, and #load_migration_file now returns the
28
- migration object/class instead of populating Migration.descendants.
29
- Migration.descendants is now only used for temporary storage, and
30
- will no longer contain all migration objects/classes used by the
31
- migrator.
@@ -1,22 +0,0 @@
1
- = New Features
2
-
3
- * The date_arithmetic extension now supports arbitrary expressions
4
- as interval values on PostgreSQL 9.4+. Previously, only integers
5
- were supported for the interval values.
6
-
7
- = Other Improvements
8
-
9
- * Most Kernel#respond_to? calls have been converted to equivalent
10
- defined? calls for better performance. defined? is a keyword
11
- and is about 50% faster for the same behavior.
12
-
13
- * The is_distinct_from extension now supports the IS DISTINCT FROM
14
- syntax natively on SQLite 3.39+, instead of emulating it.
15
-
16
- * HAVING without GROUP BY is now supported on SQLite 3.39+.
17
-
18
- * Coverage testing has been significantly expanded. Previously,
19
- the core, model, plugin, and extension code had 100% line/branch
20
- coverage. 100% line/branch coverage has been added for the
21
- core extensions, bin/sequel, and the postgres adapter with the
22
- pg driver.
@@ -1,43 +0,0 @@
1
- = Improvements
2
-
3
- * When typecasting strings to other types, Sequel::Database will now
4
- by default not typecast strings that are much longer than expected
5
- for the underlying type. Depending on the underlying type, there
6
- is a limit of either 100 or 1000 bytes on the input string. This
7
- avoids potential performance issues when trying to convert
8
- arbitrary sized user input to specific types.
9
-
10
- * The respond_to? to defined? change made in 5.60.0 was reverted in
11
- 5.60.1 as it broke cases on Ruby < 3 where the object had an unused
12
- refinement that added the method.
13
-
14
- * When typecasting strings to integer, strings such as -0xa are now
15
- treated as negative hexidecimal strings, similar to how 0xa is
16
- treated as a positive hexidecimal string.
17
-
18
- * Database#foreign_key_list now returns results for partitioned
19
- tables on PostgreSQL 11+.
20
-
21
- * Timestamps before the date of calendar reform are now handled
22
- correctly by the pg_extended_date_support extension when using
23
- Ruby 3.2 preview 2+.
24
-
25
- = Backwards Compatibility
26
-
27
- * The change to not typecast strings that are too long can break
28
- backwards compatibility for applications that expect typecasting
29
- for input beyond Sequel's limits. You can disable the string
30
- bytesize checking by setting:
31
-
32
- DB.check_string_typecast_bytesize = false
33
-
34
- or by passing the check_string_typecast_bytesize: false option when
35
- creating the Database instance.
36
-
37
- * Code to workaround a bug in JRuby 9.2.0.0 has been removed from the
38
- pg_extended_date_support extension. Users of the extension should
39
- upgrade to a newer JRuby version.
40
-
41
- * The is_json and is_not_json methods have been removed from the
42
- pg_json_ops extension, as the underlying support was removed in
43
- PostgreSQL 15 beta 4.
@@ -1,132 +0,0 @@
1
- = New Features
2
-
3
- * The pg_auto_parameterize extension for automatically using bound
4
- variables when using postgres adapter with the pg driver has been
5
- added back to Sequel. This extension was originally added in Sequel
6
- 3.34.0, but was removed in 4.0.0 due to the many corner cases it
7
- had. Almost all of the corner cases have now been fixed, and
8
- the extension is now recommended for production use. Compared
9
- to the original version in Sequel 3, the reintroduced version
10
- of the extension includes the following changes:
11
-
12
- * Handles integers used in LIMIT/ORDER
13
- * Respects explicit CASTs
14
- * Tries to convert column IN (int, ...) into column = ANY($) with an
15
- array parameter
16
- * Uses the same parameter for the same object used more than once in
17
- a query
18
- * Uses parameters when inserting multiple rows via Dataset#import
19
- * Supports automatically parameterizing all of the
20
- PostgreSQL-specific types that Sequel ships support for in pg_*
21
- extensions (though some values of those types may not support
22
- automatic parameterization).
23
- * Supports skipping auto parameterization for specific values.
24
-
25
- Automatic parameterization is generally slower than Sequel's default
26
- behavior, since some optimizations Sequel uses by default do not
27
- currently support automatic parameterization.
28
-
29
- Applications may need changes to work correctly with the
30
- pg_auto_parameterize extension, such as the addition of explicit
31
- casts. Please read the extension documentation for more details.
32
-
33
- * Integer column schema entries now include :min_value and :max_value
34
- entries on most databases, indicating the minimum and maximum values
35
- supported for the column.
36
-
37
- The validation_helpers plugin now has validates_max_value and
38
- validates_min_value for testing the column value is not greater
39
- than the given maximum value and not less than the given minimum
40
- value, respectively.
41
-
42
- The auto_validations plugin now automatically uses the :min_value
43
- and :max_value column schema entries with the new validation_helpers
44
- methods to validate that the column values for integer columns are
45
- in the allowed range.
46
-
47
- * A primary_key_lookup_check_values plugin has been added for
48
- automatically typecasting and checking the primary key values are
49
- in the allowed range (given by :min_value and :max_value column
50
- schema entries) during lookup. If typecasting fails or the value
51
- is outside the allowed range, the primary key lookup will return
52
- nil without issuing a query (or will raise a NoMatchingRow error
53
- if using with_pk!).
54
-
55
- Note that this can change behavior in some cases if you are
56
- passing filter conditions during lookup instead of passing primary
57
- key values. The plugin tries to support most common filter
58
- conditions, but there are still cases that will break.
59
-
60
- * Sequel now supports shard-specific :after_connect and :connect_sqls
61
- Database options, allowing you to customize behavior for specific
62
- shards:
63
-
64
- DB = Sequel.connect('url', servers: {
65
- :shard1 => {host: '...', after_connect: proc{|conn|}},
66
- :shard2 => {host: '...', connect_sqls: ['...']},
67
- })
68
-
69
- Note that these shard-specific options will not be respected if you
70
- are calling after_connect= or connect_sqls= on the Database's
71
- connection pool.
72
-
73
- = Other Improvements
74
-
75
- * A Sequel::Postgres::IntegerOutsideBigintRange exception will now be
76
- raised if trying to literalize an integer outside PostgreSQL bigint
77
- range, to avoid PostgreSQL treating the integer as a numeric type
78
- and not respecting indexes on the related column.
79
-
80
- A pg_extended_integer_support extension has been added for
81
- customizing the behavior when literalizing an integer outside
82
- PostgreSQL bigint range, either quoting it or getting the
83
- historical behavior of using it directly in the query.
84
-
85
- * Dataset#import and #multi_insert no longer use transactions when
86
- they only run a single query.
87
-
88
- * Fractional seconds in timestamps are now respected in the
89
- named_timezones extension.
90
-
91
- * Using hstore[] types as bound variables now works on PostgreSQL.
92
-
93
- * Using BC dates and timestamps in bound variables now works on
94
- PostgreSQL.
95
-
96
- * A corner case has been fixed in eager loading where the window
97
- function eager limit strategy would be used without removing the
98
- row_number entries from the result.
99
-
100
- * The shared postgres adapter now caches reflection datasets, speeding
101
- up Database#indexes and similar methods.
102
-
103
- * The mock postgres adapter now assumes PostgreSQL 15 instead of
104
- PostgreSQL 14 by default.
105
-
106
- = Backwards Compatibility
107
-
108
- * If you are using Ruby integers outside PostgreSQL bigint range when
109
- dealing with PostgreSQL numeric column values, this version may
110
- not be compatible. It is recommended you explicitly convert the
111
- Ruby integers to BigDecimal objects if you are using them for
112
- numeric column values. You can also use the
113
- pg_extended_integer_support extension introduced in this version.
114
-
115
- = Workaround for Older Versions
116
-
117
- * If you cannot upgrade to Sequel 5.62.0, but still want to avoid the
118
- problems that come from using literal large integers on PostgreSQL,
119
- you can use the following code, where DB is your Sequel::Database
120
- object:
121
-
122
- DB.extend_datasets do
123
- def literal_integer(v)
124
- if v > 9223372036854775807 || v < -9223372036854775808
125
- raise Sequel::InvalidValue, "PostgreSQL int too large: #{v}"
126
- end
127
- super
128
- end
129
- end
130
-
131
- This workaround should work all the way back to Sequel 3.29.0,
132
- released in November 2011.
@@ -1,33 +0,0 @@
1
- = New Features
2
-
3
- * On Ruby 3.2, the pool_class: :timed_queue Database option can now
4
- be used to use an alternative connection pool that stores
5
- connections in a queue, and uses the new Queue#pop :timeout option
6
- in Ruby 3.2 to implement the pool timeout. This new connection
7
- pool is simpler than the default connection pool. It is not yet
8
- the default connection pool on Ruby 3.2, but it may become the
9
- default in a later version. Users of Ruby 3.2 are encouraged to
10
- try out the pool_class: :timed_queue Database option and provide
11
- feedback on how it works in their application.
12
-
13
- = Other Improvements
14
-
15
- * The tactical_eager_loading plugin now works in combination with the
16
- single_table_inheritance and class_table_inheritance plugins, when
17
- loading an association only defined in a specific subclass.
18
- Previously, eager loading would be skipped in such a case. Now,
19
- an eager load will be attempted for all instances supporting the
20
- association.
21
-
22
- * The validate_associated plugin now avoids database type errors for
23
- non-integer association keys. In cases where the associated object
24
- doesn't have a value for the associated key, and the current object
25
- does not have a key value that can be set in the associated object,
26
- validation errors in the associated object related to the associated
27
- key will be ignored.
28
-
29
- * Thread-keyed connection pool hashes now use compare_by_identity for
30
- better performance.
31
-
32
- * The JRuby workaround in the named_timezones extension is no longer
33
- used on JRuby 9.3.9.0+, as JRuby fixed the related bug.
@@ -1,50 +0,0 @@
1
- = New Features
2
-
3
- * A :graph_use_association_block association option has been added,
4
- which makes eager_graph use the association block (as eager does),
5
- generally resulting in a JOIN to a subquery:
6
-
7
- Artist.one_to_many :tracks, graph_use_association_block: true do |ds|
8
- ds.where(foo: 3)
9
- end
10
- Artist.eager_graph(:tracks)
11
- # SELECT albums.id, tracks.id AS tracks_id, tracks.album_id
12
- # FROM albums
13
- # LEFT OUTER JOIN (SELECT * FROM tracks WHERE (foo = 3)) AS tracks
14
- # ON (tracks.album_id = albums.id)
15
-
16
- Assuming that the database can optimize the query correctly, using
17
- the :graph_use_association_block option is probably simpler than
18
- than using other :graph_* options to duplicate the conditions added
19
- by the association block.
20
-
21
- * Numeric/Decimal column schema entries now include :min_value and
22
- :max_value entries on most databases, indicating the minimum and
23
- maximum values supported for the column. Similar to the support
24
- for integer columns added in 5.62.0, this allows the
25
- auto_validations plugin to automatically validate the values of
26
- the columns are in the allowed range.
27
-
28
- = Other Improvements
29
-
30
- * many_through_{one,many} associations now support eager_graph
31
- callbacks.
32
-
33
- * The :db_type column schema entries on SQLAnywhere now include
34
- precision/scale information, to work with the numeric/decimal
35
- column min_value/max_value support.
36
-
37
- * The oracle adapter now includes a :column_size column schema
38
- entry containing the precision of the columns, to work with the
39
- numeric/decimal column min_value/max_value support.
40
-
41
- = Backwards Compatibility
42
-
43
- * The private Database#column_schema_integer_min_max_values method
44
- added in 5.62.0 now takes a column schema hash instead of a
45
- database type string.
46
-
47
- * Code that previously looked at the :db_type column schema entry on
48
- SQLAnywhere should be updated to look at the :domain_name entry, and
49
- code that looked at the :domain_name_with_size entry should be
50
- updated to look at the :db_type entry.
@@ -1,21 +0,0 @@
1
- = Improvements
2
-
3
- * The pg_auto_parameterize extension now uses a modified placeholder
4
- literalizer for speeding up the generation of SQL queries in the same
5
- cases where a standard dataset would use a placeholder literalizer.
6
- This can provide a 4% speedup for simple queries, with greater
7
- speedups for more complex queries.
8
-
9
- * Database#indexes now returns indexes for partitioned tables on
10
- PostgreSQL 11+.
11
-
12
- * MySQL versions not supporting CHECK constraints no longer include
13
- :min_value/:max_value schema entries for decimal/numeric columns.
14
-
15
- = Backwards Compatibility
16
-
17
- * The Dataset::PlaceholderLiterlizer::Record.loader API has changed,
18
- it now accepts the Dataset::PlaceholderLiterlizer class to use as
19
- the first argument. This makes it easier to create
20
- Dataset::PlaceholderLiterlizer subclasses, such as the one now used
21
- by the pg_auto_parameterize extension.
@@ -1,24 +0,0 @@
1
- = Improvements
2
-
3
- * Dataset#empty? now correctly handles datasets using custom SQL or
4
- Dataset#values where the first value in the first row is NULL.
5
-
6
- * Dataset#count without an argument or block now works correctly on
7
- Microsoft SQL Server when using custom SQL that uses ORDER BY.
8
-
9
- * Dataset#count now works correctly for datasets using Dataset#values.
10
-
11
- * Sequel now recognizes an additional SQLite constraint violation
12
- error that occurs with recent versions of amalgalite.
13
-
14
- * Dataset#values will now raise an exception when called with an empty
15
- array. Previously, an exception would not be raised until the query
16
- was sent to the database.
17
-
18
- = Backwards Compatibility
19
-
20
- * The changes to make Dataset#empty? and #count work with custom SQL
21
- on Microsoft SQL Server now result in running the custom SQL, which
22
- could result in worse performance than in previous versions. You can
23
- wrap such datasets with Dataset#from_self manually to restore the
24
- previous behavior.
@@ -1,32 +0,0 @@
1
- = New Features
2
-
3
- * A set_literalizer extension has been added, for treating Set
4
- instances in datasets similar to Array instances:
5
-
6
- DB.extension :set_literalizer
7
- DB[:table].where(column: Set.new([1, 2, 3]))
8
- # SELECT FROM table WHERE (column IN (1, 2, 3))
9
-
10
- = Improvements
11
-
12
- * Sequel now avoids the use of singleton classes for datasets on Ruby
13
- 2.4+, instead creating a regular subclass whenever a dataset would
14
- be extended via #extension or #with_extend. This significantly
15
- improves performance, up to 20-40% for common dataset usage,
16
- because it avoids creating new singleton classes for every dataset
17
- clone, and it allows for cached method lookup.
18
-
19
- * Database#tables and #views now support a :qualify option on Microsoft
20
- SQL Server to returned qualified identifiers.
21
-
22
- * The schema_dumper extension can now dump tables in non-default schemas
23
- when using Microsoft SQL Server.
24
-
25
- * The schema_dumper extension now correctly dumps string column sizes
26
- when using Microsoft SQL Server.
27
-
28
- = Backwards Compatibility
29
-
30
- * Calling Sequel::Dataset.register_extension where the second argument
31
- is not a module now issues a deprecation warning. Support for this
32
- will be removed in Sequel 6.
@@ -1,61 +0,0 @@
1
- = New Features
2
-
3
- * On PostgreSQL 9.6+, date, timestamp, and timestamptz columns now
4
- have min_value and max_value column schema entries, allowing the
5
- auto_validations plugin to automatically enforce minimum and
6
- maximum values for these column types, raising a validation error
7
- before saving, instead of database error when the query is sent
8
- to the database.
9
-
10
- * A validation_helpers_generic_type_messages plugin has been added,
11
- which improves the default type validation error messages in
12
- validation_helpers. This change was not made directly to
13
- validation_helpers for backwards compatibility reasons, but will
14
- probably become the default behavior in Sequel 6. Some examples
15
- of the improvements:
16
-
17
- # :blob type
18
- # validation_helpers default: "value is not a valid sequel::sql::blob"
19
- # with this plugin: "value is not a blob"
20
-
21
- # :boolean type
22
- # validation_helpers default: "value is not a valid trueclass or falseclass"
23
- # with this plugin: "value is not true or false"
24
-
25
- # :datetime type
26
- # validation_helpers default: "value is not a valid time or datetime"
27
- # with this plugin: "value is not a valid timestamp"
28
-
29
- # custom/database-specific types
30
- # validation_helpers default: "value is not a valid sequel::class_name"
31
- # with this plugin: "value is not the expected type"
32
-
33
- = Improvements
34
-
35
- * The constraint_validations plugin no longer raises validation
36
- errors for missing columns that have a default value. If a column
37
- is missing but has a default value, we can assume the default
38
- value is valid. Additionally, the constraint validations are now
39
- based on the underlying column value and not any deserialized
40
- value, so that the validation matches the constraint.
41
-
42
- * On PostgreSQL, normal type name parsing is skipped for enum,
43
- array, composite, range, and multirange types, ensuring that
44
- such types will not be treated incorrectly based on their
45
- type name.
46
-
47
- * The pg_extended_date_support extension now works correctly with
48
- the jdbc/postgresql adapter if there is already an entry in the
49
- oid_convertor_map for the timestamp and timestamptz types.
50
-
51
- = Backwards Compatibility
52
-
53
- * Database#schema_column_type is no longer called for all columns
54
- on PostgreSQL when parsing schema. Enum, array, composite, range,
55
- and multirange types each have their own separate type parsing
56
- method. So if you were overriding Database#schema_column_type to
57
- implement custom column schema parsing, you may need to adjust
58
- your code.
59
-
60
- * The Sequel::Postgres::ExtendedDateSupport::DATE_YEAR_1 constant
61
- has been removed.
@@ -1,26 +0,0 @@
1
- = New Features
2
-
3
- * An adapter has been added for the trilogy MySQL driver. One large
4
- advantage over mysql2 is that trilogy does not require any MySQL
5
- client libraries installed on the machine. The trilogy adapter
6
- has basically the same issues/skipped specs as the mysql2 adapter,
7
- but it also does not support an application_timezone different
8
- than the database_timezone.
9
-
10
- * Model dataset modules now have a model accessor, allowing for
11
- code such as:
12
-
13
- class Foo < Sequel::Model
14
- dataset_module do
15
- where :kept, Sequel[model.table_name][:discarded_at] => nil
16
- end
17
- end
18
-
19
- = Improvements
20
-
21
- * The mysql adapter now works with ruby-mysql 4 (the pure-ruby
22
- MySQL driver). Note that multi-results support does not work
23
- with ruby-mysql 4 (it doesn't work with mysql2, trilogy, or
24
- other Sequel adapters in general).
25
-
26
- * Warnings for unsupported flags are now avoided on ruby-mysql 3.
@@ -1,108 +0,0 @@
1
- = New Features
2
-
3
- * An integer64 extension has been added, which treats the Integer
4
- class as a generic 64-bit integer type. Sequel's default behavior
5
- for Integer is to use the integer type, which on most databases
6
- is a 32-bit type.
7
-
8
- This affects all internal use of the Integer class as a generic
9
- database type, so that methods like primary_key and foreign_key
10
- also default to using a 64-bit integer type when using this
11
- extension.
12
-
13
- * When using PostgreSQL 10+, you can use the :identity option when
14
- creating columns to create identity columns:
15
-
16
- DB.create_table(:table){Integer :id, identity: true}
17
- # CREATE TABLE "table" ("id" integer GENERATED BY DEFAULT AS IDENTITY)
18
-
19
- If you want to disallow using a user provided value when inserting,
20
- or updating you can use a value of :always:
21
-
22
- DB.create_table(:table){Integer :id, identity: :always}
23
- # CREATE TABLE "table" ("id" integer GENERATED ALWAYS AS IDENTITY)
24
-
25
- * Database#convert_serial_to_identity has been added on PostgreSQL 10.2+.
26
- This method can convert existing serial columns to identity columns
27
- in most cases, but it currently requires superuser permissions as it
28
- modifies the system tables directly.
29
-
30
- * Dataset#overriding_system_value and #overriding_user_value are
31
- now supported on PostgreSQL to work with identity columns. You can
32
- use #overriding_system_value to force the use of a user provided
33
- value for identity columns that are GENERATED ALWAYS, and you can
34
- use #overriding_user_value to ignore any user value for identity
35
- columns and always use the next entry in the sequence.
36
-
37
- = Other Improvements
38
-
39
- * On PostgreSQL 10.2+, identity columns are now used instead of serial
40
- columns as the default for auto incrementing primary keys:
41
-
42
- DB.create_table(:table){primary_key :id}
43
-
44
- # Sequel 5.7.0+ and PostgreSQL 10.2+
45
- # CREATE TABLE "table" ("id" integer
46
- # GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY)
47
-
48
- # Older Sequel version or older PostgreSQL version
49
- # CREATE TABLE "table" ("id" serial PRIMARY KEY)
50
-
51
- Identity columns fix many issues that serial columns have, in
52
- addition to being the SQL standard way to support auto incrementing
53
- columns.
54
-
55
- * PostgreSQL identity columns are now correctly recognized and the
56
- :auto_increment schema entry is now populated for them.
57
-
58
- * Dataset#with_sql_{all,each,first,single_value} now use a cached
59
- dataset to avoid clobbering the current dataset's columns.
60
- Previously, the clobbering of the current dataset's columns was
61
- documented and the method warned against using SQL with
62
- different columns. These methods are now safe to use in such
63
- cases, but will not have the same performance advantages if the
64
- current dataset is not cached.
65
-
66
- * On ruby 2.1+, Sequel now uses Process::CLOCK_MONOTONIC when
67
- performing elapsed time calculations so that it is not affected by
68
- modifications to the system's time.
69
-
70
- * In the postgres adapter, prepared statement errors related to
71
- changing types are now treated as disconnect errors. While they
72
- are not technically disconnect errors, treating them as such
73
- will in general reduce the total number of exceptions generated
74
- from 1 per affected statement per connection to 1 per
75
- connection.
76
-
77
- * In the pg_array_associations plugin, the array_type for
78
- pg_array_to_many and many_to_pg_array association reflections is
79
- now always the scalar type for the array (e.g. integer). Previously,
80
- the array type (e.g. integer[]) was used in some cases. This didn't
81
- previously result in issues as PostgreSQL considers integer[][] the
82
- same type as integer[].
83
-
84
- * In the pg_array_associations plugin, the many_to_pg_array
85
- association remove_all_* method now uses the appropriate cast to
86
- work for non-integer array types such as bigint[].
87
-
88
- * Database#server_version on PostgreSQL 10.1+ now works correctly
89
- when the connection does not support the server_version method.
90
- Now the server_version_num database setting is always used to
91
- ensure consistent behavior across adapters.
92
-
93
- * In the jdbc/oracle adapter, temporary clobs are now manually
94
- freed to prevent a memory leak, in line with the Oracle JDBC
95
- driver recommendations.
96
-
97
- * The Sequel <4 release notes and changelog are no longer shipped
98
- with the gem, decreasing the size of the gem by 20%.
99
-
100
- = Backwards Compatibility
101
-
102
- * The switch to using identity columns instead of serial columns
103
- by default on PostgreSQL 10.2+ may break backwards compatibilty
104
- in some situations, such as code that relies on what are generally
105
- considered bugs in serial columns, such as CREATE TABLE LIKE
106
- using the same sequence for the column in both the existing table
107
- and the new table, or that dropping the default value for the
108
- column does not drop the related sequence.
@@ -1,35 +0,0 @@
1
- = New Features
2
-
3
- * A sharded_timed_queue connection pool has been added. This offers
4
- most of the same features as the sharded_threaded connection pool,
5
- but uses the new Queue#pop :timeout features added in Ruby 3.2 to
6
- allow for a simpler and possibly faster and more robust
7
- implementation.
8
-
9
- * If a :pool_class option is not specified when creating a Database,
10
- Sequel will now look at the SEQUEL_DEFAULT_CONNECTION_POOL
11
- environment variable to determine the connection pool class to use.
12
- This allows you to set SEQUEL_DEFAULT_CONNECTION_POOL=timed_queue
13
- on Ruby 3.2 to test with the timed_queue connection pool without
14
- making any code changes. If the :servers Database option is given,
15
- Sequel will automatically use the sharded version of the connection
16
- pool specified by SEQUEL_DEFAULT_CONNECTION_POOL.
17
-
18
- = Other Improvements
19
-
20
- * The connection_validator, connection_expiration, and
21
- async_thread_pool extensions now work with the timed_queue and
22
- sharded_timed_queue connection pools.
23
-
24
- * The sharded_threaded connection pool now disconnects connections
25
- for all specified servers instead of just the last specified server
26
- when using remove_server.
27
-
28
- * The static_cache plugin now recognizes when the forbid_lazy_load
29
- plugin is already loaded, and does not return instances that
30
- forbid lazy load for methods that return a single object, such as
31
- Database.{[],cache_get_pk,first}.
32
-
33
- * Sequel now displays an informative error message if attempting to
34
- load the connection_validator or connection_expiration extensions
35
- when using the single threaded connection pool.
@@ -1,21 +0,0 @@
1
- = New Features
2
-
3
- * A pg_xmin_optimistic_locking plugin has been added. This plugin
4
- uses PostgreSQL's xmin system column to implement optimistic
5
- locking. The xmin system column is automatically updated whenever
6
- the database row is updated. You can load this plugin into a
7
- base model and have all models that subclass from it use optimistic
8
- locking, without needing any user-defined lock columns.
9
-
10
- = Other Improvements
11
-
12
- * set_column_allow_null is now a reversible migration method inside
13
- alter_table blocks.
14
-
15
- * The use of ILIKE no longer forces the ESCAPE clause on PostgreSQL,
16
- which allows the use of ILIKE ANY and other constructions. There
17
- is no need to use the ESCAPE clause with ILIKE, because the value
18
- Sequel uses is PostgreSQL's default.
19
-
20
- * The xid PostgreSQL type is now recognized as an integer type in the
21
- jdbc/postgresql adapter.