16.20 - setArray_nD(Object, List<Integer>, List<Integer>) - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
16.20
Release Date
April 2020
Content Type
Programming Reference
Publication ID
B035-1147-162K
Language
English (United States)

Purpose

Sets a slice of the SQL ARRAY value designated by this Array object using the element values passed in arrayElements. The slice of elements to be modified is designated by lower bound coordinates specified in lowerBounds and upper bound coordinates specified in upperBounds.

  • This method supports N-D arrays only.
  • If the coordinates specified by lowerBounds and upperBounds are set to -1, the Array object is completely overwritten starting from the lowest coordinate value.
  • This routine may set less than the full slice of elements in the array. Any section of the slice outside of the boundaries of the array are ignored.

Syntax

void setArray(Object  arrayElements,
              List<Integer>  lowerBounds,
              List<Integer>  upperBounds)
                throws SQLException

Parameters

arrayElements
An Object consisting of a Java array of element values to be set.
lowerBounds
The array index of the first element to set in the slice.
upperBounds
The array index of the last element to set in the slice.

Exceptions

Throws SQLException in the following cases:
  • The method is called for a 1-D array. A database specific code “9743 (ERRUDFJAVARRAY)< <Method> cannot be called for 1-D Arrays >” is returned.
  • An error occurs while attempting to access the array. A database specific code “9743 (ERRUDFJAVARRAY) <Failed to set elements of the array>” is returned.