class Object

Public Instance Methods

convert_value(v) click to toggle source
# File lib/rusql.rb, line 16
def convert_value(v)
  case v
  when String
    "'#{v}'"
  when Date
    v.strftime("'%Y-%m-%d'")
  when DateTime, Time
    v.strftime("'%Y-%m-%d %H:%M:%S'")
  else
    v.to_s
  end
end