Method: Factbase#query
- Defined in:
- lib/factbase.rb
#query(term, maps = nil) ⇒ Object
Create a query capable of iterating.
There is a Lisp-like syntax, for example:
(eq title 'Object Thinking')
(gt time 2024-03-23T03:21:43Z)
(gt cost 42)
(exists seenBy)
(and
(eq foo 42.998)
(or
(gt 200)
(absent zzz)))
The full list of terms available in the query you can find in the README.md file of the repository.
136 137 138 139 140 141 |
# File 'lib/factbase.rb', line 136 def query(term, maps = nil) maps ||= @maps term = to_term(term) if term.is_a?(String) require_relative 'factbase/query' Factbase::Query.new(maps, term, self) end |