Sha256: 3fd9243520e38f3bb565f92b26c7b98d1e8b04816c046b020dcd0cd23cf6d4a1
Contents?: true
Size: 671 Bytes
Versions: 9
Compression:
Stored size: 671 Bytes
Contents
module ForestLiana class OperatorValueParser def self.parse(value) operator = nil if value.first == '!' operator = '!=' value.slice!(0) elsif value.first == '>' operator = '>' value.slice!(0) elsif value.first == '<' operator = '<' value.slice!(0) elsif value.include?('*') operator = 'ILIKE' value.gsub!('*', '%') elsif value === '$present' operator = 'IS NOT NULL' value = nil elsif value === '$blank' operator = 'IS NULL' value = nil else operator = '=' end [operator, value] end end end
Version data entries
9 entries across 9 versions & 1 rubygems