Coder Social home page Coder Social logo

Comments (13)

valgog avatar valgog commented on June 24, 2024

Hello,

you can try to use https://github.com/zalando/java-sproc-wrapper. We are just finishing working on merging of https://github.com/danielnowak/sproc-spring-mapper into the code of the sproc-wrapper and optimizing caching for the mapping tree. So I hope, that after tests of the changes are done this week, we will push the changes to the java-sproc-wrapper repository.

The current code is fully functional and is used at my company in production environment very successfully.

Regards,

-- Valentin

from pgjdbc.

eliasbalasis avatar eliasbalasis commented on June 24, 2024

Thank you,

I have discovered something new

surprisingly Jdbc4Array,gerResultSet() takes advantage of PGConnection.addDataType user defined type registrations
however Jdbc4Array,gerResultSet(Map<String,Class<?>>) reports "notImplemented" error

nevertheless, the rest is relatively easy

register subclasses of PGobject with PGConnection.addDataType
then call Jdbc4Array,gerResultSet()
finally, use PGObject,getValue() to get a String representation of the user defined type and translate that to a Java representation

I still wonder why Jdbc4Array.getArray(), Jdbc4Array.getArray(Map<String,Class>) and JsbcArray.getResultSet(Map>) report "notImplemented" error

from pgjdbc.

davecramer avatar davecramer commented on June 24, 2024

Mostly due to lack of time. Patches gladly accepted.

Dave Cramer

On Thu, Jun 20, 2013 at 1:31 PM, eliasbalasis [email protected]:

Thank you,

I have discovered something new

surprisingly Jdbc4Array,gerResultSet() takes advantage of
PGConnection.addDataType user defined type registrations
however Jdbc4Array,gerResultSet(Map>) reports "notImplemented" error

nevertheless, the rest is relatively easy

register subclasses of PGobject with PGConnection.addDataType
then call Jdbc4Array,gerResultSet()
finally, use PGObject,getValue() to get a String representation of the
user defined type and translate that to a Java representation

I still wonder why Jdbc4Array.getArray(), Jdbc4Array.getArray(Map>) and
JsbcArray.getResultSet(Map>) report "notImplemented" error


Reply to this email directly or view it on GitHubhttps://github.com//issues/63#issuecomment-19768689
.

from pgjdbc.

eliasbalasis avatar eliasbalasis commented on June 24, 2024

I understand,

unfortunately lack of time is a common issue

I will keep it in mind

from pgjdbc.

valgog avatar valgog commented on June 24, 2024

So if translating a string representation of our type is not a problem, then of cause you can do like you described.

But if you start transferring relatively complex objects (arrays of types containing arrays or quoted texts) mapping them to Java objects is not so trivial.

from pgjdbc.

eliasbalasis avatar eliasbalasis commented on June 24, 2024

Indeed,

the more complex the user defined type the more complex the construction of the Java representation

however, it seems that this is the recommended way to handle user defined types translation

register PGobject descendant and implement translation from PG string representation
moreover, this is what implementations of well-known composite type registrations do
(see. PGmoney, PGpolygon, PGcircle, PGpoint, etc.)

from pgjdbc.

eliasbalasis avatar eliasbalasis commented on June 24, 2024

I was thinking,

are there any generalized parsers for PG string representations to assist translation to Java representation?

from pgjdbc.

valgog avatar valgog commented on June 24, 2024

You should be able to use the parser that sproc-wrapper is using. And please give me feedback, why you do not consider it an option.

from pgjdbc.

eliasbalasis avatar eliasbalasis commented on June 24, 2024

That sounds good,

I wanted to avoid the burden of adding one more framework and the related learning curve / effort to the project

however, the use of a generalized parser, included in s-proc as you are saying, makes it more appealing

I will check it out

from pgjdbc.

davecramer avatar davecramer commented on June 24, 2024

Have you resolved this ?

from pgjdbc.

ringerc avatar ringerc commented on June 24, 2024

See also Issue #24

from pgjdbc.

OrangeDog avatar OrangeDog commented on June 24, 2024

This appears to be fixed in 9.4.1208.

from pgjdbc.

davecramer avatar davecramer commented on June 24, 2024

stale

from pgjdbc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.