Module: Daodalus::DSL::Queries
- Included in:
- Daodalus::DSL, Select, Update, Where
- Defined in:
- lib/daodalus/dsl/queries.rb
Instance Method Summary collapse
- #find(options = {}) ⇒ Object
- #find_one(options = {}) ⇒ Object
- #select(*fields) ⇒ Object
- #where(field = nil) ⇒ Object
Instance Method Details
#find(options = {}) ⇒ Object
5 6 7 8 |
# File 'lib/daodalus/dsl/queries.rb', line 5 def find( = {}) = .merge(fields: query.selects) if query.has_selects? dao.find(query.wheres, ) end |
#find_one(options = {}) ⇒ Object
10 11 12 13 |
# File 'lib/daodalus/dsl/queries.rb', line 10 def find_one( = {}) = .merge(fields: query.selects) if query.has_selects? dao.find_one(query.wheres, ) end |