The JDBC driver converts Prism values to Java values. Each getter below accepts either a one-based column index or a column label. Use a getter that matches the encoded value in the column. When you need the natural Java representation or a nullable boolean, use untyped getObject.
ResultSet getter |
Supported Prism values or 3.1 behavior |
|---|---|
getString, getNString |
STRING, BOOLEAN ("0" or "1"), numeric types, DATE, TIME, TIMESTAMP, INTERVAL and BINARY. NULL produces Java null. |
getBoolean |
BOOLEAN and STRING, INTEGER or LONG values equal to 0 or 1. |
getByte, getShort |
INTEGER and LONG. |
getInt, getLong |
INTEGER, LONG and BIG_DECIMAL. |
getFloat, getDouble |
FLOAT, DOUBLE and BIG_DECIMAL. |
getBigDecimal |
BIG_DECIMAL. The deprecated scale overload rounds half even and should be avoided for NULL values. |
getBytes |
BINARY. |
getAsciiStream, getUnicodeStream (deprecated) |
STRING encoded as US-ASCII or UTF-8 respectively. |
getCharacterStream, getNCharacterStream |
STRING as a Java Reader. |
getBinaryStream, getBlob |
FILE, including Prism values encoding files or media as a blob. |
getClob, getNClob |
STRING as a Clob or NClob. |
getArray |
LIST as a JDBC Array. |
getDate, getTime, getTimestamp |
DATE, TIME and TIMESTAMP respectively. Calendar overloads use the supplied time zone. |
getObject |
Boxed primitives, String, BigDecimal, byte[], SQL temporal values, Array, Blob, PolyInterval or PolyDocument according to the Prism value. NULL produces Java null. |
getObject(indexOrLabel, Class<T>) |
Ordinary scalar conversions are unsupported in 3.1. Use the untyped overload or a specific getter. |
getObject(indexOrLabel, Map<String, Class<?>>), getRef, getURL, getSQLXML |
Unsupported. |
getRowId |
Exposed by JDBC, but Polypheny reports ROWID_UNSUPPORTED in its database metadata. |
The multimodel extension’s PolyRow.get and PolyDocument.get return TypedValue wrappers. Use asDocument() and asInterval() on those wrappers. Standard ResultSet retrieves those objects through untyped getObject.
© Polypheny GmbH. All Rights Reserved.