You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-8Lines changed: 9 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -104,8 +104,10 @@ The Databend type is mapped to Java type as follows:
104
104
| Decimal | BigDecimal |
105
105
| String | String |
106
106
| Date | LocalDate |
107
-
| TIMESTAMP | ZonedDateTime |
108
-
| TIMESTAMP_TZ | OffsetDateTime |
107
+
| Timestamp | ZonedDateTime |
108
+
| Timestamp_TZ | OffsetDateTime |
109
+
| Interval | String |
110
+
| Geometry | byte[]|
109
111
| Bitmap | byte[]|
110
112
| Array | String |
111
113
| Tuple | String |
@@ -114,24 +116,23 @@ The Databend type is mapped to Java type as follows:
114
116
115
117
### Temporal types
116
118
117
-
we recommend using `java.time` to avoid ambiguity and letting the driver format values via these APIs:
119
+
we recommend using `java.time` to avoid ambiguity and set/get values via these APIs:
118
120
119
121
```
120
122
void setObject(int parameterIndex, Object x)
121
123
<T> T getObject(int columnIndex, Class<T> type)
122
124
```
123
125
124
126
- TIMESTAMP_TZ and TIMESTAMP map to `OffsetDateTime`, `ZonedDateTime`, `Instant` and `LocalDateTime` (TIMESTAMP_TZ can return `OffsetDateTime` but not `ZonedDateTime`).
125
-
- Date maps to `LocalDate`, and `getObject(..., LocalDate.class)` now mirrors what `getDate().toLocalDate()` returns.
127
+
- Date maps to `LocalDate`
126
128
- When parameters do not contain a timezone, Databend uses the session timezone (not the JVM zone) when storing/returning dates on databend-jdbc ≥ 0.4.3 AND databend-query ≥1.2.844.
127
-
-`getString` return the display of default mapping type.
128
129
129
-
Timestamp/Date are also supported, note that:
130
+
old Timestamp/Date are also supported, note that:
130
131
131
-
-`getTimestamp(int, Calendar cal)` is the same as`getTimestamp(int)` (the cal is omitted) and
132
+
-`getTimestamp(int, Calendar cal)` is equivalent to`getTimestamp(int)` (the cal is omitted) and
132
133
`getObject(int, Instant.classes).toTimestamp()`
133
134
-`setTimestamp(int, Calendar cal)` is diff with `setTimestamp(int)`, the epoch is adjusted according to timezone in cal
134
-
-`setDate`/`getDate` still use the JVM timezone, and `setObject(localDate)` is equivalent to `setDate(Date.valueOf(localDate))`.
135
+
-`setDate`/`getDate` still use the JVM timezone, `getDate(1)` is equivalent to `Date.valueOf(getObject(1, LocalDate.class))`, `setDate(1, date)` is equivalent to `setObject(1, date.toLocalDate())`.
0 commit comments