oracle-r2dbc icon indicating copy to clipboard operation
oracle-r2dbc copied to clipboard

UDP Implementation

Open nirmalhk7 opened this issue 2 years ago • 3 comments

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.

nirmalhk7 avatar Aug 22 '22 17:08 nirmalhk7

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

Michael-A-McMahon avatar Oct 05 '22 00:10 Michael-A-McMahon

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

nirmalhk7 avatar Oct 14 '22 07:10 nirmalhk7

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 avatar Oct 14 '22 16:10 Michael-A-McMahon

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.

Michael-A-McMahon avatar Nov 10 '22 19:11 Michael-A-McMahon