class Sequel::SQL::CaseExpression

Represents an SQL CASE expression, used for conditional branching in SQL.

def expression?

Whether to use an expression for this CASE expression.
def expression?
  !@no_expression
end

def initialize(conditions, default, expression=(no_expression=true; nil))

all conditions represent their own boolean expression.
test each condition against, instead of having
default value. An expression can be provided to
Create an object with the given conditions and
def initialize(conditions, default, expression=(no_expression=true; nil))
  raise(Sequel::Error, 'CaseExpression conditions must be a hash or array of all two pairs') unless Sequel.condition_specifier?(conditions)
  @conditions, @default, @expression, @no_expression = conditions.to_a, default, expression, no_expression
end