Module: Sequel::JDBC::HXTT::DatabaseMethods

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

Overview

Database instance methods for MS Access databases accessed via JDBC.

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



24
25
26
# File 'lib/sequel/adapters/jdbc/hxtt.rb', line 24

def database_type
  :access
end

#dataset(opts = nil) ⇒ Object

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



20
21
22
# File 'lib/sequel/adapters/jdbc/hxtt.rb', line 20

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

#supports_savepoints?Boolean

Returns:

  • (Boolean)


28
29
30
# File 'lib/sequel/adapters/jdbc/hxtt.rb', line 28

def supports_savepoints?
  true
end

#tablesObject



32
33
34
35
36
37
38
39
40
# File 'lib/sequel/adapters/jdbc/hxtt.rb', line 32

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