Class: FluentQuery::Queries::Compiled

Inherits:
Abstract
  • Object
show all
Defined in:
lib/fluent-query/queries/compiled.rb

Overview

Compiled query.

Instance Attribute Summary collapse

Attributes inherited from Abstract

#connection

Instance Method Summary collapse

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

#rawObject

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