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.
- INTEGER_TYPE
- PG_SPECIFIC_TYPES
- STRING_TYPE
Public Instance Methods
with_fetch_size(size)
click to toggle source
Warn when calling as the fetch size is ignored by the JDBC
adapter currently.
Calls superclass method
Sequel::JDBC::Dataset#with_fetch_size
# File lib/sequel/adapters/jdbc/postgresql.rb 185 def with_fetch_size(size) 186 warn("Sequel::JDBC::Postgres::Dataset#with_fetch_size does not currently have an effect.", :uplevel=>1) 187 super 188 end
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 198 def literal_sqltime(v) 199 v.strftime("'%H:%M:%S#{sprintf(".%03d", (v.usec/1000.0).round)}'") 200 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 193 def literal_string_append(sql, v) 194 sql << "'" << db.synchronize(@opts[:server]){|c| c.escape_string(v)} << "'" 195 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 217 def type_convertor(map, meta, type, i) 218 case type 219 when *PG_SPECIFIC_TYPES 220 oid = meta.getField(i).getOID 221 if pr = db.oid_convertor_proc(oid) 222 pr 223 elsif oid == 28 # XID (Transaction ID) 224 map[INTEGER_TYPE] 225 elsif oid == 2950 # UUID 226 map[STRING_TYPE] 227 elsif meta.getPGType(i) == 'hstore' 228 HSTORE_METHOD 229 else 230 super 231 end 232 else 233 super 234 end 235 end