class Cassie::Testing::Fake::PreparedStatement
Attributes
original_statement[R]
Public Class Methods
new(statement)
click to toggle source
# File lib/cassie/testing/fake/prepared_statement.rb, line 5 def initialize(statement) @original_statement = statement end
Public Instance Methods
bind(new_params)
click to toggle source
Creates a statement bound with specific arguments
Cassandra does type checking against connection version which requires a connection.
Note: this fake implementation returns a simple statement not a bound statement. Implementing the latter would require faking the metadata on the prepared statement object which I don't have reason to do yet
# File lib/cassie/testing/fake/prepared_statement.rb, line 18 def bind(new_params) fake_bound = original_statement.clone fake_bound.instance_variable_set :@params, new_params fake_bound end