Class: FluentQuery::Queries::Compiled
- Defined in:
- lib/fluent-query/queries/compiled.rb
Overview
Compiled query.
Instance Attribute Summary collapse
-
#raw ⇒ Object
Returns the value of attribute raw.
Attributes inherited from Abstract
Instance Method Summary collapse
- #assoc(specification, *args) ⇒ Object
- #build(*args) ⇒ Object
-
#initialize(connection, query) ⇒ Compiled
constructor
A new instance of Compiled.
Methods inherited from Abstract
#all, #do, #each, #execute, #find_all, #map, #one, #processor, #single
Constructor Details
#initialize(connection, query) ⇒ Compiled
Returns a new instance of Compiled.
25 26 27 28 |
# File 'lib/fluent-query/queries/compiled.rb', line 25 def initialize(connection, query) super(connection) @raw = query.processor.compile(@connection.driver.build_query(query, :compile)) end |
Instance Attribute Details
#raw ⇒ Object
Returns the value of attribute raw.
18 19 20 |
# File 'lib/fluent-query/queries/compiled.rb', line 18 def raw @raw end |
Instance Method Details
#assoc(specification, *args) ⇒ Object
44 45 46 |
# File 'lib/fluent-query/queries/compiled.rb', line 44 def assoc(specification, *args) self.execute(*args).assoc(specification) end |
#build(*args) ⇒ Object
35 36 37 |
# File 'lib/fluent-query/queries/compiled.rb', line 35 def build(*args) @raw.complete(*args) end |