Class: Adhoq::Executor
- Inherits:
-
Object
show all
- Defined in:
- lib/adhoq/executor.rb,
lib/adhoq/executor/connection_wrapper.rb
Defined Under Namespace
Classes: ConnectionWrapper
Instance Method Summary
collapse
Constructor Details
#initialize(query) ⇒ Executor
5
6
7
8
|
# File 'lib/adhoq/executor.rb', line 5
def initialize(query)
@connection = ConnectionWrapper.new
@query = query
end
|
Instance Method Details
#execute ⇒ Object
10
11
12
|
# File 'lib/adhoq/executor.rb', line 10
def execute
wrap_result(@connection.select(@query))
end
|
#explain ⇒ Object
14
15
16
|
# File 'lib/adhoq/executor.rb', line 14
def explain
@connection.explain(@query)
end
|