pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Uwe Schindler <noreply@github.com>
To: pgsql-jdbc@lists.postgresql.org
Subject: [pgjdbc/pgjdbc] 3d14ea: feat: add support for ResultSet#getObject(OffsetTi...
Date: Tue, 29 Mar 2022 05:53:00 -0700
Message-ID: <pgjdbc/pgjdbc/push/refs/heads/master/1f9bba-3d14ea@github.com> (raw)

  Branch: refs/heads/master
  Home:   https://github.com/pgjdbc/pgjdbc
  Commit: 3d14ea45688d98ebead548e00f78756841837434
      https://github.com/pgjdbc/pgjdbc/commit/3d14ea45688d98ebead548e00f78756841837434
  Author: Uwe Schindler <uwe@thetaphi.de>
  Date:   2022-03-29 (Tue, 29 Mar 2022)

  Changed paths:
    M pgjdbc/src/main/java/org/postgresql/jdbc/PgPreparedStatement.java
    M pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
    M pgjdbc/src/main/java/org/postgresql/jdbc/TimestampUtils.java
    M pgjdbc/src/test/java/org/postgresql/test/jdbc42/GetObject310Test.java
    M pgjdbc/src/test/java/org/postgresql/test/jdbc42/SetObject310Test.java
    M pgjdbc/src/test/java/org/postgresql/test/jdbc42/TimestampUtilsTest.java

  Log Message:
  -----------
  feat: add support for ResultSet#getObject(OffsetTime.class) and PreparedStatement#setObject(OffsetTime.class) (#2467)

* Add support for OffsetTime to Postgres JDBC; make parseBackendTimestamp() use a ZoneOffset instead of a Calendar instance

* Revert the removal of the calendar cache (it is still needed for legacy conversion of Time/Date/Timestamp)

* Add more tests and add support for OffsetTime in prepared statements

* Add test for prepared statement

* Correct implementation of cache

* Change test to assert roundtrip on setObject(type) and getObject(type) return equal values (except the test with timestamp rounding)

* Add TODO entry about missing constant

* Update TimestampUtilsTest to have the special rounding conditions in the message


* Rename parameter to what it originally was

* Rewrite TimestampUtilsTest to use custom assertion method with good error messages

* remove nullability suppression

* add comments back

* Disallow conversion of non-TZ to Offset and TZ types to Local time values:
- refactor code to have the conversion exception at end of method as fallback
- also check correct types in string mode"

* Add missing checks to have all possible types

* Remove type checks in getObject

* Fix and move getLocalTime to the other JSR-310 methods, too

* Add tests for invalid type conversions; cleanup test with try-with-resources







Message-ID: <pgjdbc/pgjdbc/push/refs/heads/master/1f9bba-3d14ea@github.com>
Permalink:  ../pgjdbc%2Fpgjdbc%2Fpush%2Frefs%2Fheads%2Fmaster%2F1f9bba-3d14ea@github.com/
Also on:    postgresql.org/message-id/pgjdbc/pgjdbc/push/refs/heads/master/1f9bba-3d14ea@github.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: noreply@github.com
  Subject: Re: [pgjdbc/pgjdbc] 3d14ea: feat: add support for ResultSet#getObject(OffsetTi...
  In-Reply-To: <pgjdbc/pgjdbc/push/refs/heads/master/1f9bba-3d14ea@github.com>
  References: <pgjdbc/pgjdbc/push/refs/heads/master/1f9bba-3d14ea@github.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox