| From: | Uwe Schindler <noreply(at)github(dot)com> |
|---|---|
| To: | pgsql-jdbc(at)lists(dot)postgresql(dot)org |
| Subject: | [pgjdbc/pgjdbc] 3d14ea: feat: add support for ResultSet#getObject(OffsetTi... |
| Date: | 2022-03-29 12:53:00 |
| Message-ID: | pgjdbc/pgjdbc/push/refs/heads/master/1f9bba-3d14ea@github.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-jdbc |
Branch: refs/heads/master
Home: https://github.com/pgjdbc/pgjdbc
Commit: 3d14ea45688d98ebead548e00f78756841837434
https://github.com/pgjdbc/pgjdbc/commit/3d14ea45688d98ebead548e00f78756841837434
Author: Uwe Schindler <uwe(at)thetaphi(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | McDermott, Becky | 2022-03-29 14:26:38 | RE: [EXTERNAL] Re: Java client connection problem on FIPS enabled hosts (with password_encryption = scram-sha-256) |
| Previous Message | Dave Cramer | 2022-03-28 15:03:39 | Re: [EXTERNAL] Re: Java client connection problem on FIPS enabled hosts (with password_encryption = scram-sha-256) |