Module | Sequel::JDBC::HSQLDB::DatabaseMethods
In: | lib/sequel/adapters/jdbc/hsqldb.rb

Instance methods for HSQLDB Database objects accessed via JDBC.

### Methods

database_type db_version serial_primary_key_options

### Included Modules

::Sequel::JDBC::Transactions

### Constants

PRIMARY_KEY_INDEX_RE | = | /\Asys_idx_sys_pk_/i.freeze

### Public Instance methods

database_type()

HSQLDB uses the :hsqldb database type.

[Source]

        # File lib/sequel/adapters/jdbc/hsqldb.rb, line 14
    14:         def database_type
    15:           :hsqldb
    16:         end

db_version()

The version of the database, as an integer (e.g 2.2.5 -> 20205)

[Source]

        # File lib/sequel/adapters/jdbc/hsqldb.rb, line 25
    25:         def db_version
    26:           @db_version ||= begin
    27:             v = get{DATABASE_VERSION(){}}
    28:             if v =~ /(\d+)\.(\d+)\.(\d+)/
    29:               $1.to_i * 10000 + $2.to_i * 100 + $3.to_i
    30:             end
    31:           end
    32:         end

serial_primary_key_options()

HSQLDB uses an IDENTITY sequence as the default value for primary key columns.

[Source]

        # File lib/sequel/adapters/jdbc/hsqldb.rb, line 20
    20:         def serial_primary_key_options
    21:           {:primary_key => true, :type => :integer, :identity=>true, :start_with=>1}
    22:         end

[Validate]