class Kintone::Query::Field

Public Class Methods

new(code) click to toggle source
# File lib/kintone/query.rb, line 91
def initialize(code)
  @code = code.to_s
end

Public Instance Methods

!=(other) click to toggle source
# File lib/kintone/query.rb, line 99
def !=(other)
  save('!=', other.query_format)
end
<(other) click to toggle source
# File lib/kintone/query.rb, line 107
def <(other)
  save('<', other.query_format)
end
<=(other) click to toggle source
# File lib/kintone/query.rb, line 115
def <=(other)
  save('<=', other.query_format)
end
==(other) click to toggle source
# File lib/kintone/query.rb, line 95
def ==(other)
  save('=', other.query_format)
end
>(other) click to toggle source
# File lib/kintone/query.rb, line 103
def >(other)
  save('>', other.query_format)
end
>=(other) click to toggle source
# File lib/kintone/query.rb, line 111
def >=(other)
  save('>=', other.query_format)
end
in(other) click to toggle source
# File lib/kintone/query.rb, line 119
def in(other)
  other = "(#{other.map { |v| v.query_format }.join(', ')})" if other.is_a?(Array)
  save('in', other)
end
inspect() click to toggle source
# File lib/kintone/query.rb, line 141
def inspect
  to_s
end
like(other) click to toggle source
# File lib/kintone/query.rb, line 129
def like(other)
  save('like', other.query_format)
end
not_in(other) click to toggle source
# File lib/kintone/query.rb, line 124
def not_in(other)
  other = "(#{other.map { |v| v.query_format }.join(', ')})" if other.is_a?(Array)
  save('not in', other)
end
not_like(other) click to toggle source
# File lib/kintone/query.rb, line 133
def not_like(other)
  save('not like', other.query_format)
end
to_s() click to toggle source
# File lib/kintone/query.rb, line 137
def to_s
  "#{@code} #{@condition} #{@other}"
end

Private Instance Methods

save(condition, other) click to toggle source
# File lib/kintone/query.rb, line 147
def save(condition, other)
  @condition ||= condition
  @other ||= other
end