Skip to content

Commit b7f055e

Browse files
yahondaclaude
andcommitted
Fix XMLType return value retrieval for Oracle 12c+
The return_variable_value method also needs to handle OPAQUE/XMLTYPE data_type when reading back XMLType function return values and output parameters. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e03418a commit b7f055e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/plsql/procedure_call.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,8 +517,8 @@ def return_variable_value(argument, argument_metadata)
517517
when "PL/SQL BOOLEAN"
518518
numeric_value = @cursor[":o_#{argument}"]
519519
numeric_value.nil? ? nil : numeric_value == 1
520-
when "UNDEFINED"
521-
if argument_metadata[:type_name] == "XMLTYPE"
520+
when "UNDEFINED", "XMLTYPE", "OPAQUE/XMLTYPE"
521+
if argument_metadata[:type_name] == "XMLTYPE" || argument_metadata[:data_type] =~ /XMLTYPE/
522522
@cursor[":o_#{argument}"]
523523
end
524524
else

0 commit comments

Comments
 (0)