public class PgArray
extends java.lang.Object
implements java.sql.Array
Array is used collect one column of query result data.
Read a field of type Array into either a natively-typed Java array object or a ResultSet. Accessor methods provide the ability to capture array slices.
Other than the constructor all methods are direct implementations of those specified for java.sql.Array. Please refer to the javadoc for java.sql.Array for detailed descriptions of the functionality and parameters of the methods of this class.
ResultSet.getArray(int)| Modifier and Type | Field and Description |
|---|---|
protected org.postgresql.jdbc.PgArray.PgArrayList |
arrayList
Value of field as
PgArrayList. |
protected BaseConnection |
connection
A database connection.
|
protected byte[] |
fieldBytes |
protected java.lang.String |
fieldString
Field value as String.
|
| Constructor and Description |
|---|
PgArray(BaseConnection connection,
int oid,
byte[] fieldBytes)
Create a new Array.
|
PgArray(BaseConnection connection,
int oid,
java.lang.String fieldString)
Create a new Array.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
escapeArrayElement(java.lang.StringBuilder b,
java.lang.String s) |
void |
free() |
java.lang.Object |
getArray() |
java.lang.Object |
getArray(long index,
int count) |
java.lang.Object |
getArray(long index,
int count,
java.util.Map<java.lang.String,java.lang.Class<?>> map) |
java.lang.Object |
getArray(java.util.Map<java.lang.String,java.lang.Class<?>> map) |
java.lang.Object |
getArrayImpl(long index,
int count,
java.util.Map<java.lang.String,java.lang.Class<?>> map) |
java.lang.Object |
getArrayImpl(java.util.Map<java.lang.String,java.lang.Class<?>> map) |
int |
getBaseType() |
java.lang.String |
getBaseTypeName() |
java.sql.ResultSet |
getResultSet() |
java.sql.ResultSet |
getResultSet(long index,
int count) |
java.sql.ResultSet |
getResultSet(long index,
int count,
java.util.Map<java.lang.String,java.lang.Class<?>> map) |
java.sql.ResultSet |
getResultSet(java.util.Map<java.lang.String,java.lang.Class<?>> map) |
java.sql.ResultSet |
getResultSetImpl(long index,
int count,
java.util.Map<java.lang.String,java.lang.Class<?>> map) |
java.sql.ResultSet |
getResultSetImpl(java.util.Map<java.lang.String,java.lang.Class<?>> map) |
boolean |
isBinary() |
byte[] |
toBytes() |
java.lang.String |
toString() |
protected BaseConnection connection
protected java.lang.String fieldString
protected org.postgresql.jdbc.PgArray.PgArrayList arrayList
PgArrayList. Will be initialized only once within
buildArrayList().protected byte[] fieldBytes
public PgArray(BaseConnection connection, int oid, java.lang.String fieldString) throws java.sql.SQLException
connection - a database connectionoid - the oid of the array datatypefieldString - the array data in string formjava.sql.SQLException - if something wrong happenspublic PgArray(BaseConnection connection, int oid, byte[] fieldBytes) throws java.sql.SQLException
connection - a database connectionoid - the oid of the array datatypefieldBytes - the array data in byte formjava.sql.SQLException - if something wrong happenspublic java.lang.Object getArray()
throws java.sql.SQLException
getArray in interface java.sql.Arrayjava.sql.SQLExceptionpublic java.lang.Object getArray(long index,
int count)
throws java.sql.SQLException
getArray in interface java.sql.Arrayjava.sql.SQLExceptionpublic java.lang.Object getArrayImpl(java.util.Map<java.lang.String,java.lang.Class<?>> map)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.lang.Object getArray(java.util.Map<java.lang.String,java.lang.Class<?>> map)
throws java.sql.SQLException
getArray in interface java.sql.Arrayjava.sql.SQLExceptionpublic java.lang.Object getArray(long index,
int count,
java.util.Map<java.lang.String,java.lang.Class<?>> map)
throws java.sql.SQLException
getArray in interface java.sql.Arrayjava.sql.SQLExceptionpublic java.lang.Object getArrayImpl(long index,
int count,
java.util.Map<java.lang.String,java.lang.Class<?>> map)
throws java.sql.SQLException
java.sql.SQLExceptionpublic int getBaseType()
throws java.sql.SQLException
getBaseType in interface java.sql.Arrayjava.sql.SQLExceptionpublic java.lang.String getBaseTypeName()
throws java.sql.SQLException
getBaseTypeName in interface java.sql.Arrayjava.sql.SQLExceptionpublic java.sql.ResultSet getResultSet()
throws java.sql.SQLException
getResultSet in interface java.sql.Arrayjava.sql.SQLExceptionpublic java.sql.ResultSet getResultSet(long index,
int count)
throws java.sql.SQLException
getResultSet in interface java.sql.Arrayjava.sql.SQLExceptionpublic java.sql.ResultSet getResultSet(java.util.Map<java.lang.String,java.lang.Class<?>> map)
throws java.sql.SQLException
getResultSet in interface java.sql.Arrayjava.sql.SQLExceptionpublic java.sql.ResultSet getResultSet(long index,
int count,
java.util.Map<java.lang.String,java.lang.Class<?>> map)
throws java.sql.SQLException
getResultSet in interface java.sql.Arrayjava.sql.SQLExceptionpublic java.sql.ResultSet getResultSetImpl(java.util.Map<java.lang.String,java.lang.Class<?>> map)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.sql.ResultSet getResultSetImpl(long index,
int count,
java.util.Map<java.lang.String,java.lang.Class<?>> map)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic static void escapeArrayElement(java.lang.StringBuilder b,
java.lang.String s)
public boolean isBinary()
public byte[] toBytes()
public void free()
throws java.sql.SQLException
free in interface java.sql.Arrayjava.sql.SQLExceptionCopyright © 2021 PostgreSQL Global Development Group. All rights reserved.