Method: NoSE::Backend::Backend#prepare

Defined in:
lib/nose/backend.rb

#prepare(statement, plans = []) ⇒ Object

Prepare a statement to be executed with the given plans



87
88
89
90
91
92
93
94
95
96
97
98
99
100
# File 'lib/nose/backend.rb', line 87

def prepare(statement, plans = [])
  if statement.is_a? Query
    prepare_query statement, statement.all_fields,
                  statement.conditions, plans
  elsif statement.is_a? Delete
    prepare_update statement, plans
  elsif statement.is_a? Disconnect
    prepare_update statement, plans
  elsif statement.is_a? Connection
    prepare_update statement, plans
  else
    prepare_update statement, plans
  end
end