Module: ArJdbc::H2

Includes:
HSQLDB
Defined in:
lib/arjdbc/h2/adapter.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from HSQLDB

#_execute, #add_column, #add_limit_offset!, #change_column, #change_column_default, column_selector, #create_database, #drop_database, #last_insert_id, #modify_types, #quote, #quote_column_name, #quote_string, #quoted_false, #quoted_true, #recreate_database, #remove_index, #rename_column, #rename_table, #type_to_sql

Class Method Details

.jdbc_connection_classObject



7
8
9
# File 'lib/arjdbc/h2/adapter.rb', line 7

def self.jdbc_connection_class
  ::ActiveRecord::ConnectionAdapters::H2JdbcConnection
end

Instance Method Details

#adapter_nameObject

:nodoc:



11
12
13
# File 'lib/arjdbc/h2/adapter.rb', line 11

def adapter_name #:nodoc:
  'H2'
end

#arel2_visitorsObject



15
16
17
# File 'lib/arjdbc/h2/adapter.rb', line 15

def arel2_visitors
  super.merge 'h2' => ::Arel::Visitors::HSQLDB, 'jdbch2' => ::Arel::Visitors::HSQLDB
end

#columns(table_name, name = nil) ⇒ Object



27
28
29
# File 'lib/arjdbc/h2/adapter.rb', line 27

def columns(table_name, name=nil)
  @connection.columns_internal(table_name.to_s, name, h2_schema)
end

#h2_adapterObject



19
20
21
# File 'lib/arjdbc/h2/adapter.rb', line 19

def h2_adapter
  true
end

#tablesObject



23
24
25
# File 'lib/arjdbc/h2/adapter.rb', line 23

def tables
  @connection.tables(nil, h2_schema)
end