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 ⇒ Object
- #remove(options = {}) ⇒ Object
- #select(*fields) ⇒ Object
- #where(field = nil) ⇒ Object
Instance Method Details
#find(options = {}) ⇒ Object
5 6 7 |
# File 'lib/daodalus/dsl/queries.rb', line 5 def find( = {}) dao.find(query.wheres).select(query.selects) end |
#find_one ⇒ Object
9 10 11 |
# File 'lib/daodalus/dsl/queries.rb', line 9 def find_one Option[dao.find(query.wheres).select(query.selects).one] end |
#remove(options = {}) ⇒ Object
13 14 15 |
# File 'lib/daodalus/dsl/queries.rb', line 13 def remove( = {}) dao.find(query.wheres).remove_all end |