Class JdbcArray

  • JdbcArray represents a JDBC Array and provides methods for interacting with SQL array values.

  • Methods like getArray() and getArray(index, count) retrieve elements of the SQL array.

  • Information about the base type of the array elements can be obtained using getBaseType() and getBaseTypeName().

  • The getResultSet() and getResultSet(index, count) methods return a JdbcResultSet containing array elements.

Methods

MethodReturn typeBrief description
free()voidFor documentation of this method, see java.sql.Array#free().
getArray()ObjectFor documentation of this method, see java.sql.Array#getArray()
getArray(index, count)ObjectFor documentation of this method, see java.sql.Array#getArray(long, int).
getBaseType()IntegerFor documentation of this method, see java.sql.Array#getBaseType().
getBaseTypeName()StringFor documentation of this method, see java.sql.Array#getBaseTypeName().
getResultSet()JdbcResultSetFor documentation of this method, see java.sql.Array#getResultSet().
getResultSet(index, count)JdbcResultSetFor documentation of this method, see java.sql.Array#getResultSet(long, int).

Detailed documentation

free()


getArray()

For documentation of this method, see java.sql.Array#getArray()

Return

Object — An object containing the ordered elements of the SQL array value.


getArray(index, count)

For documentation of this method, see java.sql.Array#getArray(long, int).

Parameters

NameTypeDescription
indexIntegerThe array index of the first element to retrieve, where the first element has an index of 1.
countIntegerThe number of successive SQL array elements to retrieve.

Return

Object — An object containing up to the specified number of consecutive SQL array elements.


getBaseType()


getBaseTypeName()

For documentation of this method, see java.sql.Array#getBaseTypeName().

Return

String — The database-specific name for the built-in base type or else the fully-qualified SQL type name for a base type that is a UDT.


getResultSet()


getResultSet(index, count)

For documentation of this method, see java.sql.Array#getResultSet(long, int).

Parameters

NameTypeDescription
indexIntegerThe array index of the first element to retrieve, where the first element has an index of 1.
countIntegerThe number of successive SQL array elements to retrieve.

Return

JdbcResultSet — A JdbcResultSet containing up to the specified number of consecutive SQL array elements.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-11 UTC.