Class: RDO::EmulatedStatementExecutor
- Inherits:
-
Object
- Object
- RDO::EmulatedStatementExecutor
- Defined in:
- lib/rdo/emulated_statement_executor.rb
Overview
This StatementExecutor is used as a fallback for prepared statements.
If a DBMS driver does not implement prepared statements, this is used instead. The #execute method simply delegates back to the driver.
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Returns the value of attribute command.
Instance Method Summary collapse
-
#execute(*args) ⇒ Object
Execute the command using the given bind values.
-
#initialize(driver, command) ⇒ EmulatedStatementExecutor
constructor
Initialize a new statement executor for the given driver & command.
Constructor Details
#initialize(driver, command) ⇒ EmulatedStatementExecutor
Initialize a new statement executor for the given driver & command.
23 24 25 26 |
# File 'lib/rdo/emulated_statement_executor.rb', line 23 def initialize(driver, command) @driver = driver @command = command end |
Instance Attribute Details
#command ⇒ Object (readonly)
Returns the value of attribute command.
14 15 16 |
# File 'lib/rdo/emulated_statement_executor.rb', line 14 def command @command end |
Instance Method Details
#execute(*args) ⇒ Object
Execute the command using the given bind values.
32 33 34 |
# File 'lib/rdo/emulated_statement_executor.rb', line 32 def execute(*args) @driver.execute(command, *args) end |