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

Instance methods for H2 Database objects accessed via JDBC.

### Methods

commit_prepared_transaction database_type rollback_prepared_transaction serial_primary_key_options supports_create_table_if_not_exists? supports_prepared_transactions? supports_savepoints?

### Constants

PRIMARY_KEY_INDEX_RE | = | /\Aprimary_key/i.freeze

### Public Instance methods

commit_prepared_transaction(transaction_id)

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

[Source]

        # File lib/sequel/adapters/jdbc/h2.rb, line 11
    11:         def commit_prepared_transaction(transaction_id)
    12:           run("COMMIT TRANSACTION #{transaction_id}")
    13:         end

database_type()

H2 uses the :h2 database type.

[Source]

        # File lib/sequel/adapters/jdbc/h2.rb, line 16
    16:         def database_type
    17:           :h2
    18:         end

rollback_prepared_transaction(transaction_id)

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

[Source]

        # File lib/sequel/adapters/jdbc/h2.rb, line 22
    22:         def rollback_prepared_transaction(transaction_id)
    23:           run("ROLLBACK TRANSACTION #{transaction_id}")
    24:         end

serial_primary_key_options()

H2 uses an IDENTITY type

[Source]

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

supports_create_table_if_not_exists?()

H2 supports CREATE TABLE IF NOT EXISTS syntax.

[Source]

        # File lib/sequel/adapters/jdbc/h2.rb, line 32
    32:         def supports_create_table_if_not_exists?
    33:           true
    34:         end

supports_prepared_transactions?()

H2 supports prepared transactions

[Source]

        # File lib/sequel/adapters/jdbc/h2.rb, line 37
    37:         def supports_prepared_transactions?
    38:           true
    39:         end

supports_savepoints?()

H2 supports savepoints

[Source]

        # File lib/sequel/adapters/jdbc/h2.rb, line 42
    42:         def supports_savepoints?
    43:           true
    44:         end

[Validate]