Module: YeSQL::Bindings::Utils

Includes:
Utils::Read
Included in:
Query::Performer
Defined in:
lib/yesql/bindings/utils.rb

Instance Method Summary collapse

Methods included from Utils::Read

#statement

Instance Method Details

#statement_binds(extractor) ⇒ Object



8
9
10
11
12
13
# File 'lib/yesql/bindings/utils.rb', line 8

def statement_binds(extractor)
  statement(readable: true)
    .scan(::YeSQL::BIND_REGEX)
    .map(&:first)
    .map { extractor[_1.to_sym][:bind].values_at(:vals, :vars) }
end