oracle / oracle-r2dbc

R2DBC Driver for Oracle Database
https://oracle.com
Other
194 stars 40 forks source link

UDP Implementation #86

Closed nirmalhk7 closed 1 year ago

nirmalhk7 commented 1 year ago

Fixes #83. As explained and discussed in the issue, neither Oracle's R2DBC driver nor R2DBC itself support user defined datatypes within itself. I'm not aware about other databases, but my project used several UDTs within it, and the lack of support is causing me some issues to migrate my project to a reactive stack. Hence, my PR for the same.

I've created a custom class UserDefinedType (Implementing Type class) that records the SQL type to map to (the Java class corresponding it) and the type name (string).

.bind(1, Parameters.Out(new UserDefinedType(java.sql.Array.class, "typeName"))

After this, its relatively straightforward: every time we operate on the Type object, we check if its an instance of UserDefinedType or not and tweak it accordingly.

Michael-A-McMahon commented 1 year ago

Hi @nirmalhk7. Were you planning to return to this? If not, I think I'll have a go at it on my own.

nirmalhk7 commented 1 year ago

Hey Michael, Apologies, I was trying to craft a better way to take this issue.

You can take up this issue, but can you give an estimate when can this be released at the earliest? I think UDPs are a big part of Oracle SQL, so this does warrant a fast release

Michael-A-McMahon commented 1 year ago

Thanks for the update. I think I can have a run at this today and, if all goes well, I can get a PR ready for merging.

We are closing in on a 1.1.0 release for Oracle R2DBC. If can get the PR done today, then we can include this in the next release.

I don't want to guess when the release will happen, as I'd probably end up being wrong. However, I can say for sure that we've begun a review and approval process that is required before releasing a new version. It's too hard to say when this will be done at the moment, as most of us at Oracle are busy preparing for the Cloud World and JavaOne conferences happening next week.

Michael-A-McMahon commented 1 year ago

Changes in this branch are superseded by #104 . @nirmalhk7: I very much appreciate the effort you put in here, and your initial issue which got me thinking about this problem. If you have any feedback for the changes in #104, I'd be very interested to hear it.