class DTK::Client::SearchHash
Public Instance Methods
cols=(cols)
click to toggle source
# File lib/search_hash.rb, line 21 def cols=(cols) self.merge!(:columns => cols) end
filter=(filter)
click to toggle source
# File lib/search_hash.rb, line 24 def filter=(filter) self.merge!(:filter => filter) end
post_body_hash()
click to toggle source
# File lib/search_hash.rb, line 39 def post_body_hash() {:search => JSON.generate(self)} end
set_order_by!(col,dir="ASC")
click to toggle source
# File lib/search_hash.rb, line 27 def set_order_by!(col,dir="ASC") unless %w{ASC DESC}.include?(dir) raise Error.new("set order by direction must by 'ASC' or 'DESC'") end order_by = [{ :field => col, :order => dir }] self.merge!(:order_by => order_by) end