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

Methods

Included Modules

::Sequel::JDBC::Transactions

Constants

DATABASE_ERROR_REGEXPS = { /integrity constraint violation: unique constraint or index violation/ => UniqueConstraintViolation, /integrity constraint violation: foreign key/ => ForeignKeyConstraintViolation, /integrity constraint violation: check constraint/ => CheckConstraintViolation, /integrity constraint violation: NOT NULL check constraint/ => NotNullConstraintViolation, /serialization failure/ => SerializationFailure, }.freeze

Public Instance methods

[Source]

    # File lib/sequel/adapters/jdbc/hsqldb.rb, line 20
20:         def database_type
21:           :hsqldb
22:         end

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

[Source]

    # File lib/sequel/adapters/jdbc/hsqldb.rb, line 36
36:         def db_version
37:           return @db_version if defined?(@db_version)
38:           v = get(Sequel.function(:DATABASE_VERSION))
39:           @db_version = if v =~ /(\d+)\.(\d+)\.(\d+)/
40:             $1.to_i * 10000 + $2.to_i * 100 + $3.to_i
41:           end
42:         end

[Source]

    # File lib/sequel/adapters/jdbc/hsqldb.rb, line 24
24:         def freeze
25:           db_version
26:           super
27:         end

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

[Source]

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

HSQLDB supports DROP TABLE IF EXISTS

[Source]

    # File lib/sequel/adapters/jdbc/hsqldb.rb, line 45
45:         def supports_drop_table_if_exists?
46:           true
47:         end

[Validate]