| Class | Hash |
| In: |
lib/sequel_core/core_ext.rb
lib/sequel_core/core_sql.rb |
| Parent: | Object |
| index | -> | key |
Return a Sequel::SQL::BooleanExpression created from this hash, matching all of the conditions in this hash and the condition specified by the given argument.
# File lib/sequel_core/core_sql.rb, line 77
77: def &(ce)
78: ::Sequel::SQL::BooleanExpression.new(:AND, self, ce)
79: end
Return a Sequel::SQL::CaseExpression with this hash as the conditions and the given default value. Note that the order of the conditions will be arbitrary, so all conditions should be orthogonal.
# File lib/sequel_core/core_sql.rb, line 97
97: def case(default, expression = nil)
98: ::Sequel::SQL::CaseExpression.new(to_a, default, expression)
99: end
Return a Sequel::SQL::BooleanExpression created from this hash, matching all of the conditions.
# File lib/sequel_core/core_sql.rb, line 103
103: def sql_expr
104: ::Sequel::SQL::BooleanExpression.from_value_pairs(self)
105: end
Return a Sequel::SQL::BooleanExpression created from this hash, matching none of the conditions.
# File lib/sequel_core/core_sql.rb, line 109
109: def sql_negate
110: ::Sequel::SQL::BooleanExpression.from_value_pairs(self, :AND, true)
111: end
Return a Sequel::SQL::BooleanExpression created from this hash, matching any of the conditions.
# File lib/sequel_core/core_sql.rb, line 115
115: def sql_or
116: ::Sequel::SQL::BooleanExpression.from_value_pairs(self, :OR)
117: end
Return a Sequel::SQL::BooleanExpression created from this hash, matching all of the conditions in this hash or the condition specified by the given argument.
# File lib/sequel_core/core_sql.rb, line 84
84: def |(ce)
85: ::Sequel::SQL::BooleanExpression.new(:OR, self, ce)
86: end
Return a Sequel::SQL::BooleanExpression created from this hash, not matching any of the conditions.
# File lib/sequel_core/core_sql.rb, line 90
90: def ~
91: ::Sequel::SQL::BooleanExpression.from_value_pairs(self, :OR, true)
92: end