File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -371,8 +371,10 @@ def plsql_to_ruby_data_type(metadata)
371371 def ruby_value_to_ora_value ( value , type = nil , metadata = { } )
372372 type ||= value . class
373373 case type . to_s . to_sym
374- when :Fixnum , :String
374+ when :Fixnum
375375 value
376+ when :String
377+ value . to_s
376378 when :BigDecimal
377379 case value
378380 when TrueClass
Original file line number Diff line number Diff line change 145145 expect ( @conn . ruby_value_to_ora_value ( 100 , BigDecimal ) ) . to eq java . math . BigDecimal . new ( 100 )
146146 end
147147
148+ it "should translate Ruby String to string value" do
149+ expect ( @conn . ruby_value_to_ora_value ( 1.1 , String ) ) . to eq '1.1'
150+ end
151+
148152 it "should translate Ruby Bignum value to BigDecimal when BigDecimal type specified" do
149153 big_decimal = @conn . ruby_value_to_ora_value ( 12345678901234567890 , BigDecimal )
150154 expect ( big_decimal ) . to eq java . math . BigDecimal . new ( "12345678901234567890" )
You can’t perform that action at this time.
0 commit comments