Module: Sequel::JDBC::H2::DatabaseMethods

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

Overview

Instance methods for H2 Database objects accessed via JDBC.

Constant Summary collapse

PRIMARY_KEY_INDEX_RE =
/\Aprimary_key/i.freeze

Instance Method Summary collapse

Instance Method Details

#database_typeObject

H2 uses the :h2 database type.


10
11
12
# File 'lib/sequel/lib/sequel/adapters/jdbc/h2.rb', line 10

def database_type
  :h2
end

#dataset(opts = nil) ⇒ Object

Return Sequel::JDBC::H2::Dataset object with the given opts.


15
16
17
# File 'lib/sequel/lib/sequel/adapters/jdbc/h2.rb', line 15

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

#serial_primary_key_optionsObject

H2 uses an IDENTITY type


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

def serial_primary_key_options
  {:primary_key => true, :type => :identity}
end