module Realm::ROM::DefaultRepositoryQueries
Public Instance Methods
all(conditions = {})
click to toggle source
# File lib/realm/rom/default_repository_queries.rb, line 18 def all(conditions = {}) root.where(conditions).to_a end
find(id = nil, **conditions)
click to toggle source
# File lib/realm/rom/default_repository_queries.rb, line 6 def find(id = nil, **conditions) root.where({ id: id, **conditions }.compact).one! end
first(conditions = {})
click to toggle source
# File lib/realm/rom/default_repository_queries.rb, line 10 def first(conditions = {}) root.where(conditions).first end
last(conditions = {})
click to toggle source
# File lib/realm/rom/default_repository_queries.rb, line 14 def last(conditions = {}) root.where(conditions).last end