public static interface ArrayEncoding.ArrayEncoder<A>
Modifier and Type | Method and Description |
---|---|
int |
getDefaultArrayTypeOid()
The default array type oid supported by this instance.
|
boolean |
supportBinaryRepresentation(int oid)
Indicates if an array can be encoded in binary form to array oid.
|
java.lang.String |
toArrayString(char delim,
A array)
Creates
String representation of the array. |
byte[] |
toBinaryRepresentation(BaseConnection connection,
A array,
int oid)
Creates binary representation of the array.
|
int getDefaultArrayTypeOid()
java.lang.String toArrayString(char delim, A array)
String
representation of the array.delim
- The character to use to delimit between elements.array
- The array to represent as a String
.String
representation of the array.boolean supportBinaryRepresentation(int oid)
oid
- The array oid to see check for binary support.toBinaryRepresentation(BaseConnection, Object, int)
is
supported for oid.byte[] toBinaryRepresentation(BaseConnection connection, A array, int oid) throws java.sql.SQLException, java.sql.SQLFeatureNotSupportedException
connection
- The connection the binary representation will be used on. Attributes
from the connection might impact how values are translated to
binary.array
- The array to binary encode. Must not be null
, but may
contain null
elements.oid
- The array type oid to use. Calls to
supportBinaryRepresentation(int)
must have returned
true
.java.sql.SQLFeatureNotSupportedException
- If supportBinaryRepresentation(int)
is false for
oid.java.sql.SQLException