Class: FluentQuery::Queries::Prepared
- Defined in:
- lib/fluent-query/queries/prepared.rb
Overview
Prepared query.
Instance Attribute Summary
Attributes inherited from Abstract
Instance Method Summary collapse
- #assoc(specification, *args) ⇒ Object
- #build(*args) ⇒ Object
-
#initialize(connection, query) ⇒ Prepared
constructor
A new instance of Prepared.
Methods inherited from Abstract
#all, #do, #each, #execute, #find_all, #map, #one, #processor, #single
Constructor Details
#initialize(connection, query) ⇒ Prepared
Returns a new instance of Prepared.
24 25 26 27 |
# File 'lib/fluent-query/queries/prepared.rb', line 24 def initialize(connection, query) super(connection) @query = @connection.driver.prepare(query) end |
Instance Method Details
#assoc(specification, *args) ⇒ Object
43 44 45 |
# File 'lib/fluent-query/queries/prepared.rb', line 43 def assoc(specification, *args) self.execute(*args).assoc(specification) end |
#build(*args) ⇒ Object
34 35 36 |
# File 'lib/fluent-query/queries/prepared.rb', line 34 def build(*args) [@query, args] end |