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
196 def with_fetch_size(size)
197   warn("Sequel::JDBC::Postgres::Dataset#with_fetch_size does not currently have an effect.", :uplevel=>1)
198   super
199 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
209 def literal_sqltime(v)
210   v.strftime("'%H:%M:%S#{sprintf(".%03d", (v.usec/1000.0).round)}'")
211 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
204 def literal_string_append(sql, v)
205   sql << "'" << db.synchronize(@opts[:server]){|c| c.escape_string(v)} << "'"
206 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
228 def type_convertor(map, meta, type, i)
229   case type
230   when *PG_SPECIFIC_TYPES
231     oid = meta.getField(i).getOID
232     if pr = db.oid_convertor_proc(oid)
233       pr
234     elsif oid == 28 # XID (Transaction ID)
235       map[INTEGER_TYPE]
236     elsif oid == 2950 # UUID
237       map[STRING_TYPE]
238     elsif meta.getPGType(i) == 'hstore'
239       HSTORE_METHOD
240     else
241       super
242     end
243   else
244     super
245   end
246 end