class Sequel::JDBC::Postgres::Dataset
Constants
- ARRAY_TYPE
- HSTORE_METHOD
Return PostgreSQL hstore types as ruby Hashes instead of Java HashMaps. Only used if the database does not have a conversion proc for the type.
- PG_SPECIFIC_TYPES
- STRING_TYPE
Private Instance Methods
literal_sqltime(v)
click to toggle source
SQL
fragment for Sequel::SQLTime
, containing just the time part
# File lib/sequel/adapters/jdbc/postgresql.rb 192 def literal_sqltime(v) 193 v.strftime("'%H:%M:%S#{sprintf(".%03d", (v.usec/1000.0).round)}'") 194 end
literal_string_append(sql, v)
click to toggle source
Literalize strings similar to the native postgres adapter
# File lib/sequel/adapters/jdbc/postgresql.rb 187 def literal_string_append(sql, v) 188 sql << "'" << db.synchronize(@opts[:server]){|c| c.escape_string(v)} << "'" 189 end
type_convertor(map, meta, type, i)
click to toggle source
Calls superclass method
Sequel::JDBC::Dataset#type_convertor
# File lib/sequel/adapters/jdbc/postgresql.rb 210 def type_convertor(map, meta, type, i) 211 case type 212 when *PG_SPECIFIC_TYPES 213 oid = meta.getField(i).getOID 214 if pr = db.oid_convertor_proc(oid) 215 pr 216 elsif oid == 2950 # UUID 217 map[STRING_TYPE] 218 elsif meta.getPGType(i) == 'hstore' 219 HSTORE_METHOD 220 else 221 super 222 end 223 else 224 super 225 end 226 end