Module: Sequel::JDBC::Pervasive::DatabaseMethods

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

Constant Summary collapse

AUTO_INCREMENT =
'AUTO_INCREMENT'.freeze
PRIMARY_KEY =
'PRIMARY KEY'.freeze
SQL_BEGIN =
"START TRANSACTION".freeze
SQL_COMMIT =
"COMMIT".freeze
SQL_SAVEPOINT =
'SAVEPOINT autopoint_%d'.freeze
SQL_ROLLBACK_TO_SAVEPOINT =
'ROLLBACK TO SAVEPOINT autopoint_%d'.freeze
NULL =
"NULL".freeze
NOT_NULL =
"NOT NULL".freeze
UNIQUE =
"UNIQUE".freeze

Instance Method Summary collapse

Instance Method Details

#database_typeObject



22
23
24
# File 'lib/sequel/adapters/jdbc/pervasive.rb', line 22

def database_type
  :pervasive
end

#dataset(opts = nil) ⇒ Object

Return instance of Sequel::JDBC::Pervasive::Dataset with the given opts.



18
19
20
# File 'lib/sequel/adapters/jdbc/pervasive.rb', line 18

def dataset(opts=nil)
  Sequel::JDBC::Pervasive::Dataset.new(self, opts)
end

#supports_savepoints?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/sequel/adapters/jdbc/pervasive.rb', line 26

def supports_savepoints?
  true
end

#tablesObject



30
31
32
33
34
35
36
37
38
# File 'lib/sequel/adapters/jdbc/pervasive.rb', line 30

def tables
  ts = []
  m = output_identifier_meth
  (:getTables, nil, nil, nil, ['TABLE'].to_java(:string)) do |h|
    h = downcase_hash_keys(h)
    ts << m.call(h[:table_name])
  end
  ts
end