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



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

def database_type
  :pervasive
end

#dataset(opts = nil) ⇒ Object

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



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

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

#supports_savepoints?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/sequel/adapters/jdbc/pervasive.rb', line 31

def supports_savepoints?
  true
end

#tablesObject



35
36
37
38
39
40
41
42
43
# File 'lib/sequel/adapters/jdbc/pervasive.rb', line 35

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