Sha256: f9683f971b12b9b1eba75b52e7829188b17b3fcb918066cbc818c68da5e6aad7
Contents?: true
Size: 596 Bytes
Versions: 4
Compression:
Stored size: 596 Bytes
Contents
class Dynomite::Item::Query::Relation class ComparisionExpression def initialize(where_group, comparisions) @where_group, @comparisions = where_group, comparisions end def or? @where_group.or? end def build # join @comparisions with AND if there are more than one expression = [] expression << 'NOT' if @where_group.not? expression << '(' if @comparisions.size > 1 expression << @comparisions.join(' AND ') # always AND within a group expression << ')' if @comparisions.size > 1 expression.join(' ') end end end
Version data entries
4 entries across 4 versions & 1 rubygems