Class TwoWaySQL::MergeResult
In: lib/twowaysql/template.rb
Parent: Object

TwoWaySQL::MergeResult represents merge result of template and data. it contains SQL string with placeholders, and bound variables associated with placeholders.

Usage

  merged = template.merge(:job => "MANAGER", :deptno => 30)
  merged.sql                #=> "SELECT * FROM emp WHERE job = ? AND deptno = ?"
  merged.bound_variables    #=> ["MANAGER", 30]

Methods

bound_variables   new   sql   vars  

Public Class methods

Public Instance methods

return array of variables which indices are corresponding to placeholders. alias ‘vars’ is available for short-hand.

Return

array of bound variables

return merge result SQL with placeholders (question mark).

Return

merge result SQL with placeholders

vars()

Alias for bound_variables

[Validate]