Re: Patch: Add support for hstore extension - and map it to/from java.util.Map - Mailing list pgsql-jdbc

From Craig Ringer
Subject Re: Patch: Add support for hstore extension - and map it to/from java.util.Map
Date
Msg-id 4FB9FA49.4070409@ringerc.id.au
Whole thread Raw
In response to Patch: Add support for hstore extension - and map it to/from java.util.Map  (Mikko Tiihonen <mikko.tiihonen@nitorcreations.com>)
Responses Re: json type  (Mikko Tiihonen <mikko.tiihonen@nitorcreations.com>)
Re: Patch: Add support for hstore extension - and map it to/from java.util.Map  (Shijun Kong <skong@investoranalytics.com>)
List pgsql-jdbc
On 05/10/2012 05:17 PM, Mikko Tiihonen wrote:
> Hi,
>
> Here is a patch to enable initial support for hstore in the jdbc driver.
>
> With the patch using ResultSet.getObject() on a hstore column and it
> returns a HashMap<String, String>
> Similarly a Statement.setObject(Map<Object,Object> will send the data
> to backend using hstore format.

That's absolutely brilliant, thankyou!

Of course, now there's a `json' type that folks will probably use much
of the time instead, not least because it should be easier to work with
from JDBC. I doubt it'll be as efficient and fast as hstore for
single-level key/value info though.

--
Craig Ringer

pgsql-jdbc by date:

Previous
From: Craig Ringer
Date:
Subject: Re: Java 1.4
Next
From: Craig Ringer
Date:
Subject: Re: Postgres JDBC, WS and commit