Comments (13)
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.
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.
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" errornevertheless, 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 representationI 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.
I understand,
unfortunately lack of time is a common issue
I will keep it in mind
from pgjdbc.
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.
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.
I was thinking,
are there any generalized parsers for PG string representations to assist translation to Java representation?
from pgjdbc.
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.
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.
Have you resolved this ?
from pgjdbc.
See also Issue #24
from pgjdbc.
This appears to be fixed in 9.4.1208.
from pgjdbc.
stale
from pgjdbc.
Related Issues (20)
- When BI tool connects to pg, it causes OOM HOT 4
- conversion for `TIME '24:00'` to LocalTime breaks in binary-mode
- DatabaseMetaDataTest does not test binary mode
- When fetching a BOOLEAN data type for a column, this is identified as a BIT data type by java.sql.Types HOT 7
- Failing while building postgresql version 42.2.20 using ./gradlew build (postgresql:42.2.20) HOT 4
- CallableStatement#getUpdateCount() seems wrong for stored procedures HOT 3
- Prevent fetchFieldMetaData() from being run when unnecessary. HOT 11
- setMaxRows doesn't limit rows HOT 3
- Move PGStream.receiveInteger2 and receiveInteger4 to VisibleBufferedInputStream, and remove int2Buf, int4Buf HOT 1
- Reuse buffers and reduce allocations in GSSInputStream
- Connection.rollback should cancel in-flight queries HOT 1
- Connection.abort should cancel in-flight queries HOT 3
- Test against PostgreSQL head. HOT 2
- DDL batch commit, pg_stat_activity displays execution one by one, not batch execution HOT 4
- Multiple BEGIN ATOMIC ... END; not supported for prepared statement. HOT 5
- Feature: please support getObject(int, byte[].class) for bytea HOT 3
- batched updates + reWriteBatchedInserts + transactions does not return row count of affected rows HOT 10
- ResultSetMetaData.getColumnType() java.sql.Types.BOOLEAN field misidentified as BIT HOT 1
- 42.7.3 GitHub release jar is different from the jar on maven HOT 1
- NamedParameterJdbcTemplate execute complex Insert Query HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pgjdbc.