class Upsert::Connection::Java_ComMysqlJdbc_JDBC4Connection
@private
Public Instance Methods
bind_value(v)
click to toggle source
Calls superclass method
Upsert::Connection#bind_value
# File lib/upsert/connection/Java_ComMysqlJdbc_JDBC4Connection.rb, line 18 def bind_value(v) case v when DateTime, Time date = v.utc java.time.LocalDateTime.of(date.year, date.month, date.day, date.hour, date.min, date.sec, date.nsec) when Date java.time.LocalDate.of(v.year, v.month, v.day) else super end end
quote_ident(k)
click to toggle source
# File lib/upsert/connection/Java_ComMysqlJdbc_JDBC4Connection.rb, line 9 def quote_ident(k) if metal.useAnsiQuotedIdentifiers DOUBLE_QUOTE + k.to_s.gsub(DOUBLE_QUOTE, '""') + DOUBLE_QUOTE else # Escape backticks by doubling them. Ref http://dev.mysql.com/doc/refman/5.7/en/identifiers.html BACKTICK + k.to_s.gsub(BACKTICK, BACKTICK + BACKTICK) + BACKTICK end end