sequel 5.107.0 → 5.109.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. checksums.yaml +4 -4
  2. data/bin/sequel +5 -5
  3. data/lib/sequel/adapters/ado.rb +1 -1
  4. data/lib/sequel/adapters/amalgalite.rb +34 -8
  5. data/lib/sequel/adapters/ibmdb.rb +2 -2
  6. data/lib/sequel/adapters/jdbc/hsqldb.rb +1 -1
  7. data/lib/sequel/adapters/jdbc/mssql.rb +28 -5
  8. data/lib/sequel/adapters/jdbc/mysql.rb +1 -1
  9. data/lib/sequel/adapters/jdbc/postgresql.rb +14 -3
  10. data/lib/sequel/adapters/jdbc.rb +4 -3
  11. data/lib/sequel/adapters/mock.rb +1 -1
  12. data/lib/sequel/adapters/mysql.rb +7 -2
  13. data/lib/sequel/adapters/mysql2.rb +5 -4
  14. data/lib/sequel/adapters/postgres.rb +42 -39
  15. data/lib/sequel/adapters/shared/db2.rb +5 -2
  16. data/lib/sequel/adapters/shared/mssql.rb +11 -5
  17. data/lib/sequel/adapters/shared/mysql.rb +2 -2
  18. data/lib/sequel/adapters/shared/postgres.rb +80 -1028
  19. data/lib/sequel/adapters/shared/sqlanywhere.rb +0 -32
  20. data/lib/sequel/adapters/shared/sqlite.rb +3 -3
  21. data/lib/sequel/adapters/sqlite.rb +13 -9
  22. data/lib/sequel/adapters/trilogy.rb +2 -1
  23. data/lib/sequel/adapters/utils/emulate_offset_with_reverse_and_count.rb +1 -1
  24. data/lib/sequel/adapters/utils/mysql_mysql2.rb +11 -1
  25. data/lib/sequel/connection_pool/sharded_single.rb +1 -1
  26. data/lib/sequel/connection_pool/sharded_threaded.rb +7 -5
  27. data/lib/sequel/connection_pool/sharded_timed_queue.rb +3 -3
  28. data/lib/sequel/connection_pool/threaded.rb +9 -7
  29. data/lib/sequel/connection_pool/timed_queue.rb +2 -2
  30. data/lib/sequel/connection_pool.rb +3 -3
  31. data/lib/sequel/core.rb +44 -24
  32. data/lib/sequel/database/connecting.rb +1 -1
  33. data/lib/sequel/database/features.rb +1 -1
  34. data/lib/sequel/database/misc.rb +6 -11
  35. data/lib/sequel/database/query.rb +2 -2
  36. data/lib/sequel/database/schema_generator.rb +4 -4
  37. data/lib/sequel/database/schema_methods.rb +2 -2
  38. data/lib/sequel/database/transactions.rb +5 -7
  39. data/lib/sequel/dataset/actions.rb +2 -2
  40. data/lib/sequel/dataset/features.rb +4 -4
  41. data/lib/sequel/dataset/graph.rb +1 -1
  42. data/lib/sequel/dataset/misc.rb +3 -3
  43. data/lib/sequel/dataset/prepared_statements.rb +2 -2
  44. data/lib/sequel/dataset/query.rb +8 -8
  45. data/lib/sequel/dataset/sql.rb +32 -13
  46. data/lib/sequel/dataset.rb +2 -2
  47. data/lib/sequel/deprecated.rb +2 -2
  48. data/lib/sequel/exceptions.rb +2 -2
  49. data/lib/sequel/extensions/_pretty_table.rb +1 -1
  50. data/lib/sequel/extensions/async_thread_pool.rb +3 -3
  51. data/lib/sequel/extensions/auto_cast_date_and_time.rb +2 -2
  52. data/lib/sequel/extensions/blank.rb +2 -2
  53. data/lib/sequel/extensions/constraint_validations.rb +1 -1
  54. data/lib/sequel/extensions/core_refinements.rb +7 -10
  55. data/lib/sequel/extensions/date_arithmetic.rb +1 -1
  56. data/lib/sequel/extensions/datetime_parse_to_time.rb +2 -2
  57. data/lib/sequel/extensions/duplicate_columns_handler.rb +1 -3
  58. data/lib/sequel/extensions/graph_each.rb +1 -1
  59. data/lib/sequel/extensions/index_caching.rb +1 -1
  60. data/lib/sequel/extensions/inflector.rb +5 -5
  61. data/lib/sequel/extensions/is_distinct_from.rb +2 -2
  62. data/lib/sequel/extensions/lit_require_frozen.rb +20 -4
  63. data/lib/sequel/extensions/migration.rb +21 -7
  64. data/lib/sequel/extensions/named_timezones.rb +9 -9
  65. data/lib/sequel/extensions/pg_array.rb +10 -8
  66. data/lib/sequel/extensions/pg_array_ops.rb +69 -14
  67. data/lib/sequel/extensions/pg_auto_parameterize.rb +2 -2
  68. data/lib/sequel/extensions/pg_auto_parameterize_in_array.rb +3 -3
  69. data/lib/sequel/extensions/pg_enum.rb +2 -2
  70. data/lib/sequel/extensions/pg_extended_date_support.rb +5 -5
  71. data/lib/sequel/extensions/pg_extended_integer_support.rb +1 -1
  72. data/lib/sequel/extensions/pg_hstore.rb +2 -2
  73. data/lib/sequel/extensions/pg_hstore_ops.rb +5 -5
  74. data/lib/sequel/extensions/pg_inet.rb +2 -2
  75. data/lib/sequel/extensions/pg_inet_ops.rb +2 -2
  76. data/lib/sequel/extensions/pg_interval.rb +6 -6
  77. data/lib/sequel/extensions/pg_json.rb +4 -4
  78. data/lib/sequel/extensions/pg_json_ops.rb +15 -13
  79. data/lib/sequel/extensions/pg_range.rb +6 -6
  80. data/lib/sequel/extensions/pg_range_ops.rb +7 -7
  81. data/lib/sequel/extensions/pg_row.rb +4 -4
  82. data/lib/sequel/extensions/pg_row_ops.rb +6 -6
  83. data/lib/sequel/extensions/provenance.rb +2 -2
  84. data/lib/sequel/extensions/query.rb +2 -2
  85. data/lib/sequel/extensions/s.rb +6 -10
  86. data/lib/sequel/extensions/schema_dumper.rb +10 -6
  87. data/lib/sequel/extensions/sequel_4_dataset_methods.rb +2 -0
  88. data/lib/sequel/extensions/sql_comments.rb +1 -1
  89. data/lib/sequel/extensions/sql_log_normalizer.rb +1 -1
  90. data/lib/sequel/extensions/sqlite_json_ops.rb +2 -2
  91. data/lib/sequel/extensions/string_agg.rb +5 -5
  92. data/lib/sequel/extensions/symbol_aref.rb +12 -32
  93. data/lib/sequel/extensions/symbol_aref_refinement.rb +2 -5
  94. data/lib/sequel/extensions/symbol_as.rb +1 -2
  95. data/lib/sequel/extensions/symbol_as_refinement.rb +1 -5
  96. data/lib/sequel/extensions/transaction_connection_validator.rb +1 -1
  97. data/lib/sequel/model/associations.rb +17 -17
  98. data/lib/sequel/model/base.rb +18 -15
  99. data/lib/sequel/model/inflections.rb +1 -1
  100. data/lib/sequel/model/plugins.rb +2 -2
  101. data/lib/sequel/model.rb +2 -2
  102. data/lib/sequel/plugins/association_pks.rb +1 -1
  103. data/lib/sequel/plugins/association_proxies.rb +4 -4
  104. data/lib/sequel/plugins/auto_restrict_eager_graph.rb +2 -0
  105. data/lib/sequel/plugins/caching.rb +28 -3
  106. data/lib/sequel/plugins/class_table_inheritance.rb +1 -1
  107. data/lib/sequel/plugins/column_encryption.rb +10 -10
  108. data/lib/sequel/plugins/concurrent_eager_loading.rb +2 -2
  109. data/lib/sequel/plugins/csv_serializer.rb +9 -20
  110. data/lib/sequel/plugins/deprecated_associations.rb +2 -2
  111. data/lib/sequel/plugins/eager_each.rb +1 -1
  112. data/lib/sequel/plugins/finder.rb +1 -1
  113. data/lib/sequel/plugins/forbid_lazy_load.rb +3 -3
  114. data/lib/sequel/plugins/insert_conflict.rb +1 -1
  115. data/lib/sequel/plugins/insert_returning_select.rb +1 -1
  116. data/lib/sequel/plugins/instance_filters.rb +8 -0
  117. data/lib/sequel/plugins/instance_hooks.rb +19 -0
  118. data/lib/sequel/plugins/json_serializer.rb +4 -4
  119. data/lib/sequel/plugins/lazy_attributes.rb +1 -1
  120. data/lib/sequel/plugins/many_through_many.rb +1 -1
  121. data/lib/sequel/plugins/mssql_optimistic_locking.rb +9 -0
  122. data/lib/sequel/plugins/optimistic_locking.rb +12 -2
  123. data/lib/sequel/plugins/optimistic_locking_base.rb +14 -0
  124. data/lib/sequel/plugins/pg_array_associations.rb +4 -4
  125. data/lib/sequel/plugins/pg_auto_constraint_validations.rb +3 -3
  126. data/lib/sequel/plugins/pg_eager_any_typed_array.rb +2 -2
  127. data/lib/sequel/plugins/pg_xmin_optimistic_locking.rb +11 -2
  128. data/lib/sequel/plugins/prepared_statements.rb +2 -2
  129. data/lib/sequel/plugins/select_on_skipped_update.rb +63 -0
  130. data/lib/sequel/plugins/serialization.rb +1 -1
  131. data/lib/sequel/plugins/sharding.rb +1 -1
  132. data/lib/sequel/plugins/single_table_inheritance.rb +21 -3
  133. data/lib/sequel/plugins/skip_saving_columns.rb +2 -2
  134. data/lib/sequel/plugins/split_values.rb +1 -1
  135. data/lib/sequel/plugins/sql_comments.rb +8 -8
  136. data/lib/sequel/plugins/subclasses.rb +6 -6
  137. data/lib/sequel/plugins/subset_conditions.rb +5 -16
  138. data/lib/sequel/plugins/tactical_eager_loading.rb +1 -1
  139. data/lib/sequel/plugins/throw_failures.rb +3 -3
  140. data/lib/sequel/plugins/unused_associations.rb +5 -5
  141. data/lib/sequel/plugins/validate_associated.rb +7 -1
  142. data/lib/sequel/plugins/validate_associated_context.rb +52 -0
  143. data/lib/sequel/plugins/validation_helpers.rb +1 -1
  144. data/lib/sequel/plugins/xml_serializer.rb +2 -0
  145. data/lib/sequel/sql.rb +120 -116
  146. data/lib/sequel/version.rb +1 -1
  147. metadata +5 -3
@@ -39,7 +39,7 @@ module Sequel
39
39
  # :skip_invalid :: Do not try to validate columns that are already invalid.
40
40
  #
41
41
  # The default validation options for all models can be modified by
42
- # overridding the Model#default_validation_helpers_options private method.
42
+ # overriding the Model#default_validation_helpers_options private method.
43
43
  # By changing the default options, you can setup internationalization of the
44
44
  # error messages. For example, you would modify the default options:
45
45
  #
@@ -1,5 +1,7 @@
1
1
  # frozen-string-literal: true
2
2
 
3
+ # SEQUEL6: Remove
4
+
3
5
  require 'nokogiri'
4
6
 
5
7
  module Sequel
data/lib/sequel/sql.rb CHANGED
@@ -371,7 +371,7 @@ module Sequel
371
371
  SQL::CaseExpression.new(*args)
372
372
  end
373
373
 
374
- # Cast the reciever to the given SQL type. You can specify a ruby class as a type,
374
+ # Cast the receiver to the given SQL type. You can specify a ruby class as a type,
375
375
  # and it is handled similarly to using a database independent type in the schema methods.
376
376
  #
377
377
  # Sequel.cast(:a, :integer) # CAST(a AS integer)
@@ -380,7 +380,7 @@ module Sequel
380
380
  SQL::Cast.new(arg, sql_type)
381
381
  end
382
382
 
383
- # Cast the reciever to the given SQL type (or the database's default Integer type if none given),
383
+ # Cast the receiver to the given SQL type (or the database's default Integer type if none given),
384
384
  # and return the result as a +NumericExpression+, so you can use the bitwise operators
385
385
  # on the result.
386
386
  #
@@ -390,7 +390,7 @@ module Sequel
390
390
  cast(arg, sql_type || Integer).sql_number
391
391
  end
392
392
 
393
- # Cast the reciever to the given SQL type (or the database's default String type if none given),
393
+ # Cast the receiver to the given SQL type (or the database's default String type if none given),
394
394
  # and return the result as a +StringExpression+, so you can use +
395
395
  # directly on the result for SQL string concatenation.
396
396
  #
@@ -687,7 +687,7 @@ module Sequel
687
687
 
688
688
  # Holds methods that are used to cast objects to different SQL types.
689
689
  module CastMethods
690
- # Cast the reciever to the given SQL type. You can specify a ruby class as a type,
690
+ # Cast the receiver to the given SQL type. You can specify a ruby class as a type,
691
691
  # and it is handled similarly to using a database independent type in the schema methods.
692
692
  #
693
693
  # Sequel.function(:func).cast(:integer) # CAST(func() AS integer)
@@ -696,7 +696,7 @@ module Sequel
696
696
  Cast.new(self, sql_type)
697
697
  end
698
698
 
699
- # Cast the reciever to the given SQL type (or the database's default Integer type if none given),
699
+ # Cast the receiver to the given SQL type (or the database's default Integer type if none given),
700
700
  # and return the result as a +NumericExpression+, so you can use the bitwise operators
701
701
  # on the result.
702
702
  #
@@ -706,7 +706,7 @@ module Sequel
706
706
  Cast.new(self, sql_type || Integer).sql_number
707
707
  end
708
708
 
709
- # Cast the reciever to the given SQL type (or the database's default String type if none given),
709
+ # Cast the receiver to the given SQL type (or the database's default String type if none given),
710
710
  # and return the result as a +StringExpression+, so you can use +
711
711
  # directly on the result for SQL string concatenation.
712
712
  #
@@ -1060,123 +1060,127 @@ module Sequel
1060
1060
  # in a boolean value in SQL.
1061
1061
  class BooleanExpression < ComplexExpression
1062
1062
  include BooleanMethods
1063
-
1064
- # Take pairs of values (e.g. a hash or array of two element arrays)
1065
- # and converts it to a +BooleanExpression+. The operator and args
1066
- # used depends on the case of the right (2nd) argument:
1067
- #
1068
- # 0..10 :: left >= 0 AND left <= 10
1069
- # [1,2] :: left IN (1,2)
1070
- # nil :: left IS NULL
1071
- # true :: left IS TRUE
1072
- # false :: left IS FALSE
1073
- # /as/ :: left ~ 'as'
1074
- # :blah :: left = blah
1075
- # 'blah' :: left = 'blah'
1076
- #
1077
- # If multiple arguments are given, they are joined with the op given (AND
1078
- # by default, OR possible). If negate is set to true,
1079
- # all subexpressions are inverted before used. Therefore, the following
1080
- # expressions are equivalent:
1081
- #
1082
- # ~from_value_pairs(hash)
1083
- # from_value_pairs(hash, :OR, true)
1084
- def self.from_value_pairs(pairs, op=:AND, negate=false)
1085
- pairs = pairs.map{|l,r| from_value_pair(l, r)}
1086
- pairs.map!{|ce| invert(ce)} if negate
1087
- pairs.length == 1 ? pairs[0] : new(op, *pairs)
1088
- end
1089
-
1090
- # Return a BooleanExpression based on the right side of the pair.
1091
- def self.from_value_pair(l, r)
1092
- case r
1093
- when Range
1094
- unless r.begin.nil?
1095
- begin_expr = new(:>=, l, r.begin)
1096
- end
1097
- unless r.end.nil?
1098
- end_expr = new(r.exclude_end? ? :< : :<=, l, r.end)
1099
- end
1100
- if begin_expr
1101
- if end_expr
1102
- new(:AND, begin_expr, end_expr)
1063
+
1064
+ module ClassMethods
1065
+ # Take pairs of values (e.g. a hash or array of two element arrays)
1066
+ # and converts it to a +BooleanExpression+. The operator and args
1067
+ # used depends on the case of the right (2nd) argument:
1068
+ #
1069
+ # 0..10 :: left >= 0 AND left <= 10
1070
+ # [1,2] :: left IN (1,2)
1071
+ # nil :: left IS NULL
1072
+ # true :: left IS TRUE
1073
+ # false :: left IS FALSE
1074
+ # /as/ :: left ~ 'as'
1075
+ # :blah :: left = blah
1076
+ # 'blah' :: left = 'blah'
1077
+ #
1078
+ # If multiple arguments are given, they are joined with the op given (AND
1079
+ # by default, OR possible). If negate is set to true,
1080
+ # all subexpressions are inverted before used. Therefore, the following
1081
+ # expressions are equivalent:
1082
+ #
1083
+ # ~from_value_pairs(hash)
1084
+ # from_value_pairs(hash, :OR, true)
1085
+ def from_value_pairs(pairs, op=:AND, negate=false)
1086
+ pairs = pairs.map{|l,r| from_value_pair(l, r)}
1087
+ pairs.map!{|ce| invert(ce)} if negate
1088
+ pairs.length == 1 ? pairs[0] : new(op, *pairs)
1089
+ end
1090
+
1091
+ # Return a BooleanExpression based on the right side of the pair.
1092
+ def from_value_pair(l, r)
1093
+ case r
1094
+ when Range
1095
+ unless r.begin.nil?
1096
+ begin_expr = new(:>=, l, r.begin)
1097
+ end
1098
+ unless r.end.nil?
1099
+ end_expr = new(r.exclude_end? ? :< : :<=, l, r.end)
1100
+ end
1101
+ if begin_expr
1102
+ if end_expr
1103
+ new(:AND, begin_expr, end_expr)
1104
+ else
1105
+ begin_expr
1106
+ end
1107
+ elsif end_expr
1108
+ end_expr
1103
1109
  else
1104
- begin_expr
1110
+ new(:'=', 1, 1)
1105
1111
  end
1106
- elsif end_expr
1107
- end_expr
1108
- else
1109
- new(:'=', 1, 1)
1110
- end
1111
- when ::Array, ::Set
1112
- r = r.dup.freeze unless r.frozen?
1113
- new(:IN, l, r)
1114
- when ::String
1115
- r = r.dup.freeze unless r.frozen?
1116
- new(:'=', l, r)
1117
- when ::Sequel::Dataset
1118
- new(:IN, l, r)
1119
- when NegativeBooleanConstant
1120
- new(:"IS NOT", l, r.constant)
1121
- when BooleanConstant
1122
- new(:IS, l, r.constant)
1123
- when NilClass, TrueClass, FalseClass
1124
- new(:IS, l, r)
1125
- when Regexp
1126
- StringExpression.like(l, r)
1127
- when DelayedEvaluation
1128
- Sequel.delay{|ds| from_value_pair(l, r.call(ds))}
1129
- when Dataset::PlaceholderLiteralizer::Argument
1130
- prev_transform = r.instance_variable_get(:@transformer)
1131
- r.transform do |v|
1132
- if prev_transform
1133
- v = prev_transform.call(v)
1112
+ when ::Array, ::Set
1113
+ r = r.dup.freeze unless r.frozen?
1114
+ new(:IN, l, r)
1115
+ when ::String
1116
+ r = r.dup.freeze unless r.frozen?
1117
+ new(:'=', l, r)
1118
+ when ::Sequel::Dataset
1119
+ new(:IN, l, r)
1120
+ when NegativeBooleanConstant
1121
+ new(:"IS NOT", l, r.constant)
1122
+ when BooleanConstant
1123
+ new(:IS, l, r.constant)
1124
+ when NilClass, TrueClass, FalseClass
1125
+ new(:IS, l, r)
1126
+ when Regexp
1127
+ StringExpression.like(l, r)
1128
+ when DelayedEvaluation
1129
+ Sequel.delay{|ds| from_value_pair(l, r.call(ds))}
1130
+ when Dataset::PlaceholderLiteralizer::Argument
1131
+ prev_transform = r.instance_variable_get(:@transformer)
1132
+ r.transform do |v|
1133
+ if prev_transform
1134
+ v = prev_transform.call(v)
1135
+ end
1136
+ from_value_pair(l, v)
1134
1137
  end
1135
- from_value_pair(l, v)
1138
+ else
1139
+ new(:'=', l, r)
1136
1140
  end
1137
- else
1138
- new(:'=', l, r)
1139
1141
  end
1140
- end
1141
- private_class_method :from_value_pair
1142
-
1143
- # Invert the expression, if possible. If the expression cannot
1144
- # be inverted, raise an error. An inverted expression should match everything that the
1145
- # uninverted expression did not match, and vice-versa, except for possible issues with
1146
- # SQL NULL (i.e. 1 == NULL is NULL and 1 != NULL is also NULL).
1147
- #
1148
- # BooleanExpression.invert(:a) # NOT "a"
1149
- def self.invert(ce)
1150
- case ce
1151
- when BooleanExpression
1152
- case op = ce.op
1153
- when :AND, :OR
1154
- BooleanExpression.new(OPERATOR_INVERSIONS[op], *ce.args.map{|a| BooleanExpression.invert(a)})
1155
- when :IN, :"NOT IN"
1156
- BooleanExpression.new(OPERATOR_INVERSIONS[op], *ce.args.dup)
1157
- else
1158
- if ce.args.length == 2
1159
- case ce.args[1]
1160
- when Function, LiteralString, PlaceholderLiteralString
1161
- # Special behavior to not push down inversion in this case because doing so
1162
- # can result in incorrect behavior for ANY/SOME/ALL operators.
1163
- BooleanExpression.new(:NOT, ce)
1142
+ private :from_value_pair
1143
+
1144
+ # Invert the expression, if possible. If the expression cannot
1145
+ # be inverted, raise an error. An inverted expression should match everything that the
1146
+ # uninverted expression did not match, and vice-versa, except for possible issues with
1147
+ # SQL NULL (i.e. 1 == NULL is NULL and 1 != NULL is also NULL).
1148
+ #
1149
+ # BooleanExpression.invert(:a) # NOT "a"
1150
+ def invert(ce)
1151
+ case ce
1152
+ when BooleanExpression
1153
+ case op = ce.op
1154
+ when :AND, :OR
1155
+ BooleanExpression.new(ComplexExpression::OPERATOR_INVERSIONS[op], *ce.args.map{|a| BooleanExpression.invert(a)})
1156
+ when :IN, :"NOT IN"
1157
+ BooleanExpression.new(ComplexExpression::OPERATOR_INVERSIONS[op], *ce.args.dup)
1158
+ else
1159
+ if ce.args.length == 2
1160
+ case ce.args[1]
1161
+ when Function, LiteralString, PlaceholderLiteralString
1162
+ # Special behavior to not push down inversion in this case because doing so
1163
+ # can result in incorrect behavior for ANY/SOME/ALL operators.
1164
+ BooleanExpression.new(:NOT, ce)
1165
+ else
1166
+ BooleanExpression.new(ComplexExpression::OPERATOR_INVERSIONS[op], *ce.args.dup)
1167
+ end
1164
1168
  else
1165
- BooleanExpression.new(OPERATOR_INVERSIONS[op], *ce.args.dup)
1169
+ BooleanExpression.new(ComplexExpression::OPERATOR_INVERSIONS[op], *ce.args.dup)
1166
1170
  end
1167
- else
1168
- BooleanExpression.new(OPERATOR_INVERSIONS[op], *ce.args.dup)
1169
1171
  end
1172
+ when StringExpression, NumericExpression
1173
+ raise(Sequel::Error, "cannot invert #{ce.inspect}")
1174
+ when Constant
1175
+ ComplexExpression::CONSTANT_INVERSIONS[ce] || raise(Sequel::Error, "cannot invert #{ce.inspect}")
1176
+ else
1177
+ BooleanExpression.new(:NOT, ce)
1170
1178
  end
1171
- when StringExpression, NumericExpression
1172
- raise(Sequel::Error, "cannot invert #{ce.inspect}")
1173
- when Constant
1174
- CONSTANT_INVERSIONS[ce] || raise(Sequel::Error, "cannot invert #{ce.inspect}")
1175
- else
1176
- BooleanExpression.new(:NOT, ce)
1177
1179
  end
1178
1180
  end
1179
1181
 
1182
+ extend ClassMethods
1183
+
1180
1184
  # Always use an AND operator for & on BooleanExpressions
1181
1185
  def &(ce)
1182
1186
  BooleanExpression.new(:AND, self, ce)
@@ -1620,13 +1624,13 @@ module Sequel
1620
1624
  # of strings, where each arg in args goes between the string elements.
1621
1625
  attr_reader :str
1622
1626
 
1623
- # The arguments that will be subsituted into the placeholders.
1627
+ # The arguments that will be substituted into the placeholders.
1624
1628
  # Either an array of unnamed placeholders (which will be substituted in
1625
1629
  # order for ? characters), or a hash of named placeholders (which will be
1626
1630
  # substituted for :key phrases).
1627
1631
  attr_reader :args
1628
1632
 
1629
- # Whether to surround the expression with parantheses
1633
+ # Whether to surround the expression with parentheses
1630
1634
  attr_reader :parens
1631
1635
 
1632
1636
  # Create an object with the given string, placeholder arguments, and parens flag.
@@ -1637,7 +1641,7 @@ module Sequel
1637
1641
  freeze
1638
1642
  end
1639
1643
 
1640
- # Return a copy of the that will be surrounded by parantheses.
1644
+ # Return a copy of the that will be surrounded by parentheses.
1641
1645
  def with_parens
1642
1646
  @parens ? self : self.class.new(@str, @args, true)
1643
1647
  end
@@ -1749,11 +1753,11 @@ module Sequel
1749
1753
  include StringConcatenationMethods
1750
1754
  include InequalityMethods
1751
1755
 
1752
- # Map of [regexp, case_insenstive] to +ComplexExpression+ operator symbol
1756
+ # Map of [regexp, case_insensitive] to +ComplexExpression+ operator symbol
1753
1757
  LIKE_MAP = {[true, true]=>:'~*', [true, false]=>:~, [false, true]=>:ILIKE, [false, false]=>:LIKE}.freeze
1754
1758
  LIKE_MAP.each_key(&:freeze)
1755
1759
 
1756
- # Creates a SQL pattern match exprssion. left (l) is the SQL string we
1760
+ # Creates a SQL pattern match expression. left (l) is the SQL string we
1757
1761
  # are matching against, and ces are the patterns we are matching.
1758
1762
  # The match succeeds if any of the patterns match (SQL OR).
1759
1763
  #
@@ -6,7 +6,7 @@ module Sequel
6
6
 
7
7
  # The minor version of Sequel. Bumped for every non-patch level
8
8
  # release, generally around once a month.
9
- MINOR = 107
9
+ MINOR = 109
10
10
 
11
11
  # The tiny version of Sequel. Usually 0, only bumped for bugfix
12
12
  # releases that fix regressions from previous versions.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequel
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.107.0
4
+ version: 5.109.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Evans
@@ -386,6 +386,7 @@ files:
386
386
  - lib/sequel/plugins/primary_key_lookup_check_values.rb
387
387
  - lib/sequel/plugins/rcte_tree.rb
388
388
  - lib/sequel/plugins/require_valid_schema.rb
389
+ - lib/sequel/plugins/select_on_skipped_update.rb
389
390
  - lib/sequel/plugins/serialization.rb
390
391
  - lib/sequel/plugins/serialization_modification_detection.rb
391
392
  - lib/sequel/plugins/sharding.rb
@@ -416,6 +417,7 @@ files:
416
417
  - lib/sequel/plugins/update_refresh.rb
417
418
  - lib/sequel/plugins/uuid.rb
418
419
  - lib/sequel/plugins/validate_associated.rb
420
+ - lib/sequel/plugins/validate_associated_context.rb
419
421
  - lib/sequel/plugins/validation_class_methods.rb
420
422
  - lib/sequel/plugins/validation_contexts.rb
421
423
  - lib/sequel/plugins/validation_helpers.rb
@@ -448,14 +450,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
448
450
  requirements:
449
451
  - - ">="
450
452
  - !ruby/object:Gem::Version
451
- version: 1.9.2
453
+ version: '2.0'
452
454
  required_rubygems_version: !ruby/object:Gem::Requirement
453
455
  requirements:
454
456
  - - ">="
455
457
  - !ruby/object:Gem::Version
456
458
  version: '0'
457
459
  requirements: []
458
- rubygems_version: 4.0.16
460
+ rubygems_version: 4.0.20
459
461
  specification_version: 4
460
462
  summary: The Database Toolkit for Ruby
461
463
  test_files: []