class Getto::Repository::Sequel::Search

Public Instance Methods

order() { |order(sort: sort, order: order)| ... } click to toggle source
# File lib/getto/repository/sequel/search.rb, line 33
def order
  order = []
  yield Order.new(sort: sort, order: order)
  order
end
pages(count) click to toggle source
# File lib/getto/repository/sequel/search.rb, line 16
def pages(count)
  Getto::Repository::Page.new(count: count, limit: limit).pages
end
where() { |where(query: query, where: where)| ... } click to toggle source
# File lib/getto/repository/sequel/search.rb, line 20
def where
  where = []
  yield Where.new(query: query, where: where)

  where.compact!

  if where.empty?
    {1 => 1}
  else
    ::Sequel.&(*where)
  end
end