Module Sequel::JDBC::H2::DatabaseMethods
In: lib/sequel/adapters/jdbc/h2.rb

Instance methods for H2 Database objects accessed via JDBC.

Methods

Constants

PRIMARY_KEY_INDEX_RE = /\Aprimary_key/i.freeze
DATABASE_ERROR_REGEXPS = { /Unique index or primary key violation/ => UniqueConstraintViolation, /Referential integrity constraint violation/ => ForeignKeyConstraintViolation, /Check constraint violation/ => CheckConstraintViolation, /NULL not allowed for column/ => NotNullConstraintViolation, /Deadlock detected\. The current transaction was rolled back\./ => SerializationFailure, }.freeze

Public Instance methods

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

[Source]

    # File lib/sequel/adapters/jdbc/h2.rb, line 24
24:         def commit_prepared_transaction(transaction_id, opts=OPTS)
25:           run("COMMIT TRANSACTION #{transaction_id}", opts)
26:         end

H2 uses the :h2 database type.

[Source]

    # File lib/sequel/adapters/jdbc/h2.rb, line 29
29:         def database_type
30:           :h2
31:         end

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

[Source]

    # File lib/sequel/adapters/jdbc/h2.rb, line 35
35:         def rollback_prepared_transaction(transaction_id, opts=OPTS)
36:           run("ROLLBACK TRANSACTION #{transaction_id}", opts)
37:         end

H2 uses an IDENTITY type

[Source]

    # File lib/sequel/adapters/jdbc/h2.rb, line 40
40:         def serial_primary_key_options
41:           {:primary_key => true, :type => :identity, :identity=>true}
42:         end

H2 supports CREATE TABLE IF NOT EXISTS syntax.

[Source]

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

H2 supports prepared transactions

[Source]

    # File lib/sequel/adapters/jdbc/h2.rb, line 50
50:         def supports_prepared_transactions?
51:           true
52:         end

H2 supports savepoints

[Source]

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

[Validate]