lib/sequel_core/adapters/shared/postgres.rb
def literal(v)
        case v
        when LiteralString
          v
        when String
          db.synchronize{|c| "'#{SQL::Blob === v ? c.escape_bytea(v) : c.escape_string(v)}'"}
        when Time
          "#{v.strftime(PG_TIMESTAMP_FORMAT)}.#{sprintf("%06d",v.usec)}'"
        when DateTime
          "#{v.strftime(PG_TIMESTAMP_FORMAT)}.#{sprintf("%06d", (v.sec_fraction * 86400000000).to_i)}'"
        when TrueClass
          BOOL_TRUE
        when FalseClass
          BOOL_FALSE
        else
          super
        end
      end
# Handle microseconds for Time and DateTime values, as well as PostgreSQL
# specific boolean values and string escaping.
Handle microseconds for Time and DateTime values, as well as PostgreSQL
specific boolean values and string escaping.
Handle microseconds for Time and DateTime values as well as PostgreSQL specific boolean values and string escaping .
def literal(v)
        case v
        when LiteralString
          v
        when String
          db.synchronize{|c| "'#{SQL::Blob === v ? c.escape_bytea(v) : c.escape_string(v)}'"}
        when Time
          "#{v.strftime(PG_TIMESTAMP_FORMAT)}.#{sprintf("%06d",v.usec)}'"
        when DateTime
          "#{v.strftime(PG_TIMESTAMP_FORMAT)}.#{sprintf("%06d", (v.sec_fraction * 86400000000).to_i)}'"
        when TrueClass
          BOOL_TRUE
        when FalseClass
          BOOL_FALSE
        else
          super
        end
      end
def literal ( v ) case v when LiteralString v when String db . synchronize { | c | "'#{SQL::Blob === v ? c.escape_bytea(v) : c.escape_string(v)}'" } when Time "#{v.strftime(PG_TIMESTAMP_FORMAT)}.#{sprintf("%06d",v.usec)}'" when DateTime "#{v.strftime(PG_TIMESTAMP_FORMAT)}.#{sprintf("%06d", (v.sec_fraction * 86400000000).to_i)}'" when TrueClass BOOL_TRUE when FalseClass BOOL_FALSE else super end end
Handle microseconds for Time and DateTime values, as well as PostgreSQL
specific boolean values and string escaping.
Handle microseconds for Time and DateTime values as well as PostgreSQL specific boolean values and string escaping .
v