Module: Sequel::JDBC::Postgres

Defined in:
lib/sequel/adapters/jdbc/postgresql.rb

Overview

Adapter, Database, and Dataset support for accessing a PostgreSQL database via JDBC.

Defined Under Namespace

Modules: DatabaseMethods Classes: Dataset

Class Method Summary collapse

Class Method Details

.RubyPGArray(r, i) ⇒ Object

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.



36
37
38
39
40
# File 'lib/sequel/adapters/jdbc/postgresql.rb', line 36

def self.RubyPGArray(r, i)
  if v = r.getArray(i)
    v.array.to_ary
  end
end

.RubyPGHstore(r, i) ⇒ Object

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.



45
46
47
48
49
# File 'lib/sequel/adapters/jdbc/postgresql.rb', line 45

def self.RubyPGHstore(r, i)
  if v = r.getObject(i)
    v.to_hash
  end
end