Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/oci8/oci8.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#to_onum(format = nil, nls_params = nil) ⇒ OraNumber

Converts self to OraNumber. Optional fmt and nlsparam is used as Oracle SQL function TO_NUMBER does.

Examples:

'123456.789'.to_onum # => #<OraNumber:123456.789>
'123,456.789'.to_onum('999,999,999.999') # => #<OraNumber:123456.789>
'123.456,789'.to_onum('999G999G999D999', "NLS_NUMERIC_CHARACTERS = ',.'") # => #<OraNumber:123456.789>

Parameters:

Returns:



801
802
803
# File 'lib/oci8/oci8.rb', line 801

def to_onum(format = nil, nls_params = nil)
  OraNumber.new(self, format, nls_params)
end