module Sequel::JDBC::H2::DatabaseMethods

Instance methods for H2 Database objects accessed via JDBC.

Constants

DATABASE_ERROR_REGEXPS
PRIMARY_KEY_INDEX_RE

Public Instance Methods

commit_prepared_transaction(transaction_id, opts=OPTS) click to toggle source

Commit an existing prepared transaction with the given transaction identifier string.

# File lib/sequel/adapters/jdbc/h2.rb, line 24
def commit_prepared_transaction(transaction_id, opts=OPTS)
  run("COMMIT TRANSACTION #{transaction_id}", opts)
end
database_type() click to toggle source

H2 uses the :h2 database type.

# File lib/sequel/adapters/jdbc/h2.rb, line 29
def database_type
  :h2
end
rollback_prepared_transaction(transaction_id, opts=OPTS) click to toggle source

Rollback an existing prepared transaction with the given transaction identifier string.

# File lib/sequel/adapters/jdbc/h2.rb, line 35
def rollback_prepared_transaction(transaction_id, opts=OPTS)
  run("ROLLBACK TRANSACTION #{transaction_id}", opts)
end
serial_primary_key_options() click to toggle source

H2 uses an IDENTITY type

# File lib/sequel/adapters/jdbc/h2.rb, line 40
def serial_primary_key_options
  {:primary_key => true, :type => :identity, :identity=>true}
end
supports_create_table_if_not_exists?() click to toggle source

H2 supports CREATE TABLE IF NOT EXISTS syntax.

# File lib/sequel/adapters/jdbc/h2.rb, line 45
def supports_create_table_if_not_exists?
  true
end
supports_prepared_transactions?() click to toggle source

H2 supports prepared transactions

# File lib/sequel/adapters/jdbc/h2.rb, line 50
def supports_prepared_transactions?
  true
end
supports_savepoints?() click to toggle source

H2 supports savepoints

# File lib/sequel/adapters/jdbc/h2.rb, line 55
def supports_savepoints?
  true
end