Class: RDBI::Driver::JDBC

Inherits:
RDBI::Driver
  • Object
show all
Defined in:
lib/caruby/rdbi/driver/jdbc.rb,
lib/caruby/rdbi/driver/jdbc.rb

Defined Under Namespace

Classes: Cursor, Database, Statement

Constant Summary collapse

SQL_TYPES =
{
    1 => {:type => "CHAR",           :ruby_type => :default},
    2 => {:type => "NUMERIC",        :ruby_type => :decimal},
    3 => {:type => "DECIMAL",        :ruby_type => :decimal},
    4 => {:type => "INTEGER",        :ruby_type => :integer},
    5 => {:type => "SMALLINT",       :ruby_type => :integer},
    6 => {:type => "FLOAT",          :ruby_type => :decimal},
    7 => {:type => "REAL",           :ruby_type => :decimal},
    8 => {:type => "DOUBLE",         :ruby_type => :decimal},
    9 => {:type => "DATE",           :ruby_type => :date},
   10 => {:type => "TIME",           :ruby_type => :time},
   11 => {:type => "TIMESTAMP",      :ruby_type => :timestamp},
   12 => {:type => "VARCHAR",        :ruby_type => :default},
   13 => {:type => "BOOLEAN",        :ruby_type => :boolean},
   91 => {:type => "DATE",           :ruby_type => :date},
   92 => {:type => "TIME",           :ruby_type => :time},
   93 => {:type => "TIMESTAMP",      :ruby_type => :timestamp},
  100 => {:type => nil,              :ruby_type => :default},
   -1 => {:type => "LONG VARCHAR",   :ruby_type => :default},
   -2 => {:type => "BINARY",         :ruby_type => :default},
   -3 => {:type => "VARBINARY",      :ruby_type => :default},
   -4 => {:type => "LONG VARBINARY", :ruby_type => :default},
   -5 => {:type => "BIGINT",         :ruby_type => :integer},
   -6 => {:type => "TINYINT",        :ruby_type => :integer},
   -7 => {:type => "BIT",            :ruby_type => :default},
   -8 => {:type => "CHAR",           :ruby_type => :default},
  -10 => {:type => "BLOB",           :ruby_type => :default},
  -11 => {:type => "CLOB",           :ruby_type => :default},
}

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ JDBC

Returns a new instance of JDBC.



6
7
8
# File 'lib/caruby/rdbi/driver/jdbc.rb', line 6

def initialize(*args)
  super Database, *args
end