Module: Sequel::JDBC::Oracle
- Defined in:
- lib/sequel/adapters/jdbc/oracle.rb
Defined Under Namespace
Modules: DatabaseMethods
Classes: Dataset
Constant Summary
collapse
- JAVA_BIG_DECIMAL_CONSTRUCTOR =
java.math.BigDecimal.java_class.constructor(Java::long).method(:new_instance)
Class Method Summary
collapse
Class Method Details
.OracleClob(r, i) ⇒ Object
31
32
33
34
35
36
|
# File 'lib/sequel/adapters/jdbc/oracle.rb', line 31
def self.OracleClob(r, i)
return unless clob = r.getClob(i)
str = clob.getSubString(1, clob.length)
clob.freeTemporary if clob.isTemporary
str
end
|
.OracleDecimal(r, i) ⇒ Object
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/sequel/adapters/jdbc/oracle.rb', line 20
def self.OracleDecimal(r, i)
if v = r.getBigDecimal(i)
i = v.long_value
if v == JAVA_BIG_DECIMAL_CONSTRUCTOR.call(i)
i
else
BigDecimal.new(v.to_string)
end
end
end
|