kubo / ruby-oci8

Ruby-oci8 - Oracle interface for ruby
Other
169 stars 75 forks source link

XML data type question #261

Open tomasjura opened 3 months ago

tomasjura commented 3 months ago

Hi Kubo

Is it planned support for the XML data type (https://docs.oracle.com/en/database/oracle/oracle-database/19/lnoci/oci-support-for-xml.html)? How difficult would be to implement this feature? (A dream is an integration with Nokogiri library without XML serialization and parsing.)

I know that any time the input bind parameter can be wrapped by XMLTYPE constructor, but it is annoying to to write this cast for each case.

A longer story: Oracle has a very good support for XML processing ( XSLT , XQuery 3.0 with update facility, xmldiff , ... ). I would like to give a simple access of those features for my users. Unfortunately no existing user interactive client supports the binding of XML (CLOB) from an external file, which makes usage of those functionalities even more difficult for big XMLs. The situation with Python is the same. Seems that only JDBC supports the XML bindings. But JDBC does not support named parameters (bindings) which are nice for an interactive usage.

kubo commented 3 months ago

No plans.

I tried it and removed it by https://github.com/kubo/ruby-oci8/commit/f2a64c8e385f0567fe69950e2bef3712cb836cd6 about 13 years ago. I don't remember why I gave up.

Here is the code just before it was removed. https://github.com/kubo/ruby-oci8/blob/0bb6cd3/ext/oci8/xmldb.c It looks that it tried to create REXML objects from xmlnode in oci8_make_rexml().