class PgExecArrayParams::Rewriters::Node
Attributes
ref_idx[R]
value[R]
Public Class Methods
new(value, ref_idx)
click to toggle source
# File lib/pg_exec_array_params/rewriters/node.rb, line 8 def initialize(value, ref_idx) @value = value @ref_idx = ref_idx end
Public Instance Methods
process()
click to toggle source
# File lib/pg_exec_array_params/rewriters/node.rb, line 13 def process rewrite! if should_rewrite? end
to_s()
click to toggle source
used in exception rendering
# File lib/pg_exec_array_params/rewriters/node.rb, line 18 def to_s return '<unknown node position>' unless (from, size = refs_at) "#{'^'.rjust(from, ' ')}#{'-'.rjust(size, '-')}^" end
Private Instance Methods
refs_at()
click to toggle source
returns start and end index of value string repr inside query
- from, size
# File lib/pg_exec_array_params/rewriters/node.rb, line 28 def refs_at; end
rewrite!()
click to toggle source
# File lib/pg_exec_array_params/rewriters/node.rb, line 32 def rewrite!; end
should_rewrite?()
click to toggle source
# File lib/pg_exec_array_params/rewriters/node.rb, line 30 def should_rewrite?; end