Top Description Fields Constructors Methods
org.h2.jdbc

public final Class JdbcArray

extends TraceObject
implements Array
Class Inheritance
All Implemented Interfaces
java.sql.Array
Imports
java.sql.Array, .ResultSet, .SQLException, java.util.Map, org.h2.api.ErrorCode, org.h2.message.DbException, .TraceObject, org.h2.result.SimpleResult, org.h2.value.DataType, .TypeInfo, .Value, .ValueArray, .ValueBigint, .ValueToObjectConverter

Represents an ARRAY value.

Field Summary

Modifier and TypeField and Description
private final JdbcConnection
private ValueArray
Inherited from org.h2.message.TraceObject:
ARRAYBLOBCALLABLE_STATEMENTCLOBCONNECTIONDATA_SOURCEDATABASE_META_DATAPARAMETER_META_DATAPREPARED_STATEMENTRESULT_SETRESULT_SET_META_DATASAVEPOINTSQLXMLSTATEMENTtraceXA_DATA_SOURCEXID

Constructor Summary

AccessConstructor and Description
public
JdbcArray(JdbcConnection
it belongs to
conn
,
Value
of
value
,
int
of the trace object
id
)

INTERNAL

Method Summary

Modifier and TypeMethod and Description
private void
private static int
checkRange(long index, int count, int len)

public void
free()

Implements java.sql.Array.free.

Release all resources of this object.

private Object
get()

private Object
get(long index, int count)

public Object

Returns:

the Object array
getArray
()

Implements java.sql.Array.getArray.

Returns the value as a Java array.

public Object

Returns:

the Object array
getArray
(Map<String, Class<?>>
is ignored. Only empty or null maps are supported
map
)

Implements java.sql.Array.getArray.

Returns the value as a Java array.

public Object

Returns:

the Object array
getArray
(long
the start index of the subset (starting with 1)
index
,
int
the maximum number of values
count
)

Implements java.sql.Array.getArray.

Returns the value as a Java array.

public Object

Returns:

the Object array
getArray
(long
the start index of the subset (starting with 1)
index
,
int
the maximum number of values
count
,
Map<String, Class<?>>
is ignored. Only empty or null maps are supported
map
)

Implements java.sql.Array.getArray.

Returns the value as a Java array.

public int

Returns:

the base type or Types.NULL
getBaseType
()

Implements java.sql.Array.getBaseType.

Returns the base type of the array.

public String

Returns:

the base type name or "NULL"
getBaseTypeName
()

Implements java.sql.Array.getBaseTypeName.

Returns the base type name of the array.

public ResultSet

Returns:

the result set
getResultSet
()

Implements java.sql.Array.getResultSet.

Returns the value as a result set.

public ResultSet

Returns:

the result set
getResultSet
(Map<String, Class<?>>
is ignored. Only empty or null maps are supported
map
)

Implements java.sql.Array.getResultSet.

Returns the value as a result set.

public ResultSet

Returns:

the result set
getResultSet
(long
the start index of the subset (starting with 1)
index
,
int
the maximum number of values
count
)

Implements java.sql.Array.getResultSet.

Returns the value as a result set.

public ResultSet

Returns:

the result set
getResultSet
(long
the start index of the subset (starting with 1)
index
,
int
the maximum number of values
count
,
Map<String, Class<?>>
is ignored. Only empty or null maps are supported
map
)

Implements java.sql.Array.getResultSet.

Returns the value as a result set.

private ResultSet
getResultSetImpl(long index, int count)

public String
toString()

Overrides java.lang.Object.toString.

INTERNAL

Inherited from org.h2.message.TraceObject:
debugCodedebugCodeAssigndebugCodeCalldebugCodeCalldebugCodeCallgetNextIdgetTraceIdgetTraceObjectNameisDebugEnabledisInfoEnabledlogAndConvertquotequoteArrayquoteBigDecimalquoteBytesquoteDatequoteIntArrayquoteMapquoteTimequoteTimestampsetTraceunsupported

Field Detail

connback to summary
private final JdbcConnection conn
valueback to summary
private ValueArray value

Constructor Detail

JdbcArrayback to summary
public JdbcArray(JdbcConnection conn, Value value, int id)

INTERNAL

Parameters
conn:JdbcConnection

it belongs to

value:Value

of

id:int

of the trace object

Method Detail

checkClosedback to summary
private void checkClosed()
checkRangeback to summary
private static int checkRange(long index, int count, int len)
freeback to summary
public void free()

Implements java.sql.Array.free.

Release all resources of this object.

Annotations
@Override
getback to summary
private Object get()
getback to summary
private Object get(long index, int count)
getArrayback to summary
public Object getArray() throws SQLException

Implements java.sql.Array.getArray.

Returns the value as a Java array. This method always returns an Object[].

Returns:Object

the Object array

Annotations
@Override
Exceptions
SQLException:

Doc from java.sql.Array.getArray.

if an error occurs while attempting to access the array

getArrayback to summary
public Object getArray(Map<String, Class<?>> map) throws SQLException

Implements java.sql.Array.getArray.

Returns the value as a Java array. This method always returns an Object[].

Parameters
map:Map<String, Class<?>>

is ignored. Only empty or null maps are supported

Returns:Object

the Object array

Annotations
@Override
Exceptions
SQLException:

Doc from java.sql.Array.getArray.

if an error occurs while attempting to access the array

getArrayback to summary
public Object getArray(long index, int count) throws SQLException

Implements java.sql.Array.getArray.

Returns the value as a Java array. A subset of the array is returned, starting from the index (1 meaning the first element) and up to the given object count. This method always returns an Object[].

Parameters
index:long

the start index of the subset (starting with 1)

count:int

the maximum number of values

Returns:Object

the Object array

Annotations
@Override
Exceptions
SQLException:

Doc from java.sql.Array.getArray.

if an error occurs while attempting to access the array

getArrayback to summary
public Object getArray(long index, int count, Map<String, Class<?>> map) throws SQLException

Implements java.sql.Array.getArray.

Returns the value as a Java array. A subset of the array is returned, starting from the index (1 meaning the first element) and up to the given object count. This method always returns an Object[].

Parameters
index:long

the start index of the subset (starting with 1)

count:int

the maximum number of values

map:Map<String, Class<?>>

is ignored. Only empty or null maps are supported

Returns:Object

the Object array

Annotations
@Override
Exceptions
SQLException:

Doc from java.sql.Array.getArray.

if an error occurs while attempting to access the array

getBaseTypeback to summary
public int getBaseType() throws SQLException

Implements java.sql.Array.getBaseType.

Returns the base type of the array.

Returns:int

the base type or Types.NULL

Annotations
@Override
Exceptions
SQLException:

Doc from java.sql.Array.getBaseType.

if an error occurs while attempting to access the base type

getBaseTypeNameback to summary
public String getBaseTypeName() throws SQLException

Implements java.sql.Array.getBaseTypeName.

Returns the base type name of the array. This database does support mixed type arrays and therefore there is no base type.

Returns:String

the base type name or "NULL"

Annotations
@Override
Exceptions
SQLException:

Doc from java.sql.Array.getBaseTypeName.

if an error occurs while attempting to access the type name

getResultSetback to summary
public ResultSet getResultSet() throws SQLException

Implements java.sql.Array.getResultSet.

Returns the value as a result set. The first column contains the index (starting with 1) and the second column the value.

Returns:ResultSet

the result set

Annotations
@Override
Exceptions
SQLException:

Doc from java.sql.Array.getResultSet.

if an error occurs while attempting to access the array

getResultSetback to summary
public ResultSet getResultSet(Map<String, Class<?>> map) throws SQLException

Implements java.sql.Array.getResultSet.

Returns the value as a result set. The first column contains the index (starting with 1) and the second column the value.

Parameters
map:Map<String, Class<?>>

is ignored. Only empty or null maps are supported

Returns:ResultSet

the result set

Annotations
@Override
Exceptions
SQLException:

Doc from java.sql.Array.getResultSet.

if an error occurs while attempting to access the array

getResultSetback to summary
public ResultSet getResultSet(long index, int count) throws SQLException

Implements java.sql.Array.getResultSet.

Returns the value as a result set. The first column contains the index (starting with 1) and the second column the value. A subset of the array is returned, starting from the index (1 meaning the first element) and up to the given object count.

Parameters
index:long

the start index of the subset (starting with 1)

count:int

the maximum number of values

Returns:ResultSet

the result set

Annotations
@Override
Exceptions
SQLException:

Doc from java.sql.Array.getResultSet.

if an error occurs while attempting to access the array

getResultSetback to summary
public ResultSet getResultSet(long index, int count, Map<String, Class<?>> map) throws SQLException

Implements java.sql.Array.getResultSet.

Returns the value as a result set. The first column contains the index (starting with 1) and the second column the value. A subset of the array is returned, starting from the index (1 meaning the first element) and up to the given object count.

Parameters
index:long

the start index of the subset (starting with 1)

count:int

the maximum number of values

map:Map<String, Class<?>>

is ignored. Only empty or null maps are supported

Returns:ResultSet

the result set

Annotations
@Override
Exceptions
SQLException:

Doc from java.sql.Array.getResultSet.

if an error occurs while attempting to access the array

getResultSetImplback to summary
private ResultSet getResultSetImpl(long index, int count)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

INTERNAL

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object

Annotations
@Override