class Sequel::JDBC::Postgres::Dataset
Constants
- ARRAY_METHOD
Return PostgreSQL array types as ruby Arrays instead of
JDBC
PostgreSQL driver-specific array type. Only used if the database does not have a conversion proc for the type.- 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 220 def type_convertor(map, meta, type, i) 221 case type 222 when *PG_SPECIFIC_TYPES 223 oid = meta.getField(i).getOID 224 if pr = db.oid_convertor_proc(oid) 225 pr 226 elsif type == ARRAY_TYPE 227 ARRAY_METHOD 228 elsif oid == 2950 # UUID 229 map[STRING_TYPE] 230 elsif meta.getPGType(i) == 'hstore' 231 HSTORE_METHOD 232 else 233 super 234 end 235 else 236 super 237 end 238 end