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 and conversions |
|---|---|
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 |
Returns the natural Java value, such as a boxed primitive, String, BigDecimal, byte[], SQL temporal value, Array, Blob, PolyInterval, PolyDocument, or one of the graph types below. NULL produces Java null. |
getObject(indexOrLabel, Class<T>) |
Use Array.class for lists, PolyDocument.class for documents, or the corresponding class below for graph values. NULL produces Java null. For scalar values, use a specific getter or the untyped overload. |
getObject(indexOrLabel, Map<String, Class<?>>), getRef, getURL, getSQLXML |
Unsupported. |
getRowId |
Exposed by JDBC, but Polypheny reports ROWID_UNSUPPORTED in its database metadata. |
Prism 2.3 graph values use classes in org.polypheny.jdbc.types.
| Prism value | Java type |
|---|---|
NODE |
PolyNode |
EDGE |
PolyEdge |
PATH |
PolyPath |
GRAPH |
PolyGraph |
In the multimodel extension, PolyRow.get and PolyDocument.get return TypedValue wrappers. Use the wrapper’s corresponding reader, such as asPath() or asDocument().
© Polypheny GmbH. All Rights Reserved.