module Sequel::JDBC::HSQLDB::DatabaseMethods

  1. lib/sequel/adapters/jdbc/hsqldb.rb

Included modules

  1. AutoCastDateAndTime
  2. ::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

database_type()
[show source]
   # File lib/sequel/adapters/jdbc/hsqldb.rb
22 def database_type
23   :hsqldb
24 end
db_version()

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

[show source]
   # File lib/sequel/adapters/jdbc/hsqldb.rb
38 def db_version
39   return @db_version if defined?(@db_version)
40   v = get(Sequel.function(:DATABASE_VERSION))
41   @db_version = if v =~ /(\d+)\.(\d+)\.(\d+)/
42     $1.to_i * 10000 + $2.to_i * 100 + $3.to_i
43   end
44 end
freeze()
[show source]
   # File lib/sequel/adapters/jdbc/hsqldb.rb
26 def freeze
27   db_version
28   super
29 end
serial_primary_key_options()

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

[show source]
   # File lib/sequel/adapters/jdbc/hsqldb.rb
33 def serial_primary_key_options
34   {:primary_key => true, :type => :integer, :identity=>true, :start_with=>1}
35 end
supports_drop_table_if_exists?()

HSQLDB supports DROP TABLE IF EXISTS

[show source]
   # File lib/sequel/adapters/jdbc/hsqldb.rb
47 def supports_drop_table_if_exists?
48   true
49 end