Module: PgExecArrayParams

Defined in:
lib/pg_exec_array_params.rb,
lib/pg_exec_array_params/error.rb,
lib/pg_exec_array_params/query.rb,
lib/pg_exec_array_params/column.rb,
lib/pg_exec_array_params/version.rb,
lib/pg_exec_array_params/rewriters.rb,
lib/pg_exec_array_params/sql_ref_index.rb,
lib/pg_exec_array_params/rewriters/node.rb,
lib/pg_exec_array_params/rewriters/a_expr.rb,
lib/pg_exec_array_params/rewriters/res_target.rb

Defined Under Namespace

Modules: Rewriters Classes: Column, Error, Query, SqlRefIndex

Constant Summary collapse

PARAM_REF =
'ParamRef'
REXPR =
'rexpr'
NUMBER =
'number'
LOCATION =
'location'
EQ_KIND =
0
IN_KIND =
7
VERSION =
'0.1.3'

Class Method Summary collapse

Class Method Details

.exec_array_params(conn, sql, params, *args) ⇒ Object



25
26
27
# File 'lib/pg_exec_array_params.rb', line 25

def exec_array_params(conn, sql, params, *args)
  Query.new(sql, params).exec_params(conn, *args)
end

.included(base) ⇒ Object



29
30
31
32
33
34
35
# File 'lib/pg_exec_array_params.rb', line 29

def self.included(base)
  return unless base.name == 'PG::Connection'

  base.define_method :exec_array_params do |sql, params, *args|
    Query.new(sql, params).exec_params(self, *args)
  end
end