Sha256: 285e87d161421a8be0635c23dd09531eb522c6eaf551195453cee3e627b93ed1
Contents?: true
Size: 593 Bytes
Versions: 2
Compression:
Stored size: 593 Bytes
Contents
# frozen_string_literal: true module Cursed module Adapter class Sequel < Base def descend_by(attribute) @relation = relation.order(attribute).reverse end def ascend_by(attribute) @relation = relation.order(attribute) end def limit(count) @relation = relation.limit(count) end def after(attribute, value) @relation = relation.where(::Sequel.expr(attribute) > value) end def before(attribute, value) @relation = relation.where(::Sequel.expr(attribute) < value) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cursed-0.2.0 | lib/cursed/adapter/sequel.rb |
cursed-0.1.0 | lib/cursed/adapter/sequel.rb |