final class ArrayDecoding
extends java.lang.Object
See ArrayEncoding
for description of the binary format of arrays.
Modifier and Type | Class and Description |
---|---|
private static class |
ArrayDecoding.AbstractObjectArrayDecoder<A> |
private static class |
ArrayDecoding.AbstractObjectStringArrayDecoder<A> |
private static class |
ArrayDecoding.ArrayAssistantObjectArrayDecoder |
private static interface |
ArrayDecoding.ArrayDecoder<A> |
private static class |
ArrayDecoding.MappedTypeObjectArrayDecoder |
(package private) static class |
ArrayDecoding.PgArrayList
Array list implementation specific for storing PG array elements.
|
Constructor and Description |
---|
ArrayDecoding() |
Modifier and Type | Method and Description |
---|---|
(package private) static ArrayDecoding.PgArrayList |
buildArrayList(java.lang.String fieldString,
char delim)
Parses the string representation of an array into a
ArrayDecoding.PgArrayList . |
private static <A> ArrayDecoding.ArrayDecoder<A> |
getDecoder(int oid,
BaseConnection connection) |
static java.lang.Object |
readBinaryArray(int index,
int count,
byte[] bytes,
BaseConnection connection)
Reads binary representation of array into object model.
|
static java.lang.Object |
readStringArray(int index,
int count,
int oid,
ArrayDecoding.PgArrayList list,
BaseConnection connection)
Reads
String representation of array into object model. |
private static <A> void |
storeStringValues(A[] array,
ArrayDecoding.ArrayDecoder<A> decoder,
java.util.List list,
int[] dimensionLengths,
int dim,
BaseConnection connection) |
private static <A> void |
storeValues(A[] array,
ArrayDecoding.ArrayDecoder<A> decoder,
java.nio.ByteBuffer bytes,
int skip,
int[] dimensionLengths,
int dim,
BaseConnection connection) |
private static final ArrayDecoding.ArrayDecoder<java.lang.Long[]> LONG_OBJ_ARRAY
private static final ArrayDecoding.ArrayDecoder<java.lang.Long[]> INT4_UNSIGNED_OBJ_ARRAY
private static final ArrayDecoding.ArrayDecoder<java.lang.Integer[]> INTEGER_OBJ_ARRAY
private static final ArrayDecoding.ArrayDecoder<java.lang.Short[]> SHORT_OBJ_ARRAY
private static final ArrayDecoding.ArrayDecoder<java.lang.Double[]> DOUBLE_OBJ_ARRAY
private static final ArrayDecoding.ArrayDecoder<java.lang.Float[]> FLOAT_OBJ_ARRAY
private static final ArrayDecoding.ArrayDecoder<java.lang.Boolean[]> BOOLEAN_OBJ_ARRAY
private static final ArrayDecoding.ArrayDecoder<java.lang.String[]> STRING_ARRAY
private static final ArrayDecoding.ArrayDecoder<byte[][]> BYTE_ARRAY_ARRAY
private static final ArrayDecoding.ArrayDecoder<java.math.BigDecimal[]> BIG_DECIMAL_STRING_DECODER
private static final ArrayDecoding.ArrayDecoder<java.lang.String[]> STRING_ONLY_DECODER
private static final ArrayDecoding.ArrayDecoder<java.sql.Date[]> DATE_DECODER
private static final ArrayDecoding.ArrayDecoder<java.sql.Time[]> TIME_DECODER
private static final ArrayDecoding.ArrayDecoder<java.sql.Timestamp[]> TIMESTAMP_DECODER
private static final java.util.Map<java.lang.Integer,ArrayDecoding.ArrayDecoder> OID_TO_DECODER
ArrayDecoding.ArrayDecoder
capable of processing
entries.private static <A> ArrayDecoding.ArrayDecoder<A> getDecoder(int oid, BaseConnection connection) throws java.sql.SQLException
java.sql.SQLException
public static java.lang.Object readBinaryArray(int index, int count, byte[] bytes, BaseConnection connection) throws java.sql.SQLException
index
- 1 based index of where to start on outermost array.count
- The number of items to return from outermost array (beginning at
index).bytes
- The binary representation of the array.connection
- The connection the bytes were retrieved from.java.sql.SQLException
- For failures encountered during parsing.private static <A> void storeValues(A[] array, ArrayDecoding.ArrayDecoder<A> decoder, java.nio.ByteBuffer bytes, int skip, int[] dimensionLengths, int dim, BaseConnection connection) throws java.sql.SQLException
java.sql.SQLException
static ArrayDecoding.PgArrayList buildArrayList(java.lang.String fieldString, char delim)
ArrayDecoding.PgArrayList
.fieldString
- The array value to parse.delim
- The delimiter character appropriate for the data type.ArrayDecoding.PgArrayList
representing the parsed fieldString.public static java.lang.Object readStringArray(int index, int count, int oid, ArrayDecoding.PgArrayList list, BaseConnection connection) throws java.sql.SQLException
String
representation of array into object model.index
- 1 based index of where to start on outermost array.count
- The number of items to return from outermost array (beginning at
index).oid
- The oid of the base type of the array.list
- The #buildArrayList(String, char) processed
string
representation of an array.connection
- The connection the bytes were retrieved from.java.sql.SQLException
- For failures encountered during parsing.private static <A> void storeStringValues(A[] array, ArrayDecoding.ArrayDecoder<A> decoder, java.util.List list, int[] dimensionLengths, int dim, BaseConnection connection) throws java.sql.SQLException
java.sql.SQLException