Class: YeSQL::Bindings::Transformed

Inherits:
Object
  • Object
show all
Includes:
Common::Adapter
Defined in:
lib/yesql/bindings/transformed.rb

Instance Method Summary collapse

Methods included from Common::Adapter

#adapter, #mysql?, #pg?

Constructor Details

#initialize(statement_binds:) ⇒ Transformed

Returns a new instance of Transformed.



11
12
13
# File 'lib/yesql/bindings/transformed.rb', line 11

def initialize(statement_binds:)
  @statement_binds = statement_binds
end

Instance Method Details

#callObject



15
16
17
18
19
20
# File 'lib/yesql/bindings/transformed.rb', line 15

def call
  return mysql_rails5_binds if rails5? && mysql?
  return mysql_binds if !rails5? && mysql?

  pg_binds
end