Re: Plans to implement ResultSet.getObject(String columnLabel, java.util.Map<String,Class<?>> map) ?

From: Andreas Joseph Krogh <andreas(at)visena(dot)com>
To: Dave Cramer <pg(at)fastcrypt(dot)com>
Cc: pgsql-jdbc(at)lists(dot)postgresql(dot)org
Subject: Re: Plans to implement ResultSet.getObject(String columnLabel, java.util.Map<String,Class<?>> map) ?
Date: 2020-01-10 17:36:06
Message-ID: VisenaEmail.48.ccc6455d1aab5d49.16f90827a7c@tc7-visena
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc


På fredag 10. januar 2020 kl. 18:27:55, skrev Dave Cramer <pg(at)fastcrypt(dot)com
<mailto:pg(at)fastcrypt(dot)com>>:

On Fri, 10 Jan 2020 at 12:27, Andreas Joseph Krogh <andreas(at)visena(dot)com
<mailto:andreas(at)visena(dot)com>> wrote:
På fredag 10. januar 2020 kl. 16:02:39, skrev Dave Cramer <pg(at)fastcrypt(dot)com
<mailto:pg(at)fastcrypt(dot)com>>:
There is a patch buried in the myriad of pull requests that is looking at this.

What would be your MVP here ?

MVP?

Minimal Viable Product

Well, that it "works" so that when I specify:

rs.getObject("requirement_cell", SQLUtils.typeMap)

and ProcessRequirementTaskCellJdbcData is in typeMap:

h.put("processrequirementtaskcellinfo", classOf[
ProcessRequirementTaskCellJdbcData])

Which maps to the PG-type:

create type ProcessRequirementTaskCellInfo as (task_id bigint, task_version
bigint, task_status_id integer , task_resolution_id integer, task_description
varchar, task_last_modified timestamp, phase_closed_status_id bigint,
requirement_template_idbigint);

And in the query:

select ROW(...)::ProcessRequirementTaskCellInfo

FWIW; his works in pgjdbc-ng, also with nesting, having types used as fields
in types...

Hope this helps...

--
Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
andreas(at)visena(dot)com <mailto:andreas(at)visena(dot)com>
www.visena.com <https://www.visena.com>
<https://www.visena.com>

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Brett Okken 2020-01-16 16:13:26 [pgjdbc/pgjdbc] c84e62: Utf 8 encoding optimizations (#1444)
Previous Message Dave Cramer 2020-01-10 17:27:55 Re: Plans to implement ResultSet.getObject(String columnLabel, java.util.Map<String,Class<?>> map) ?