Returns an Object from the original array of objects (java.util.ArrayList). Its main function within the
xsql language is to facilitate the construction of SOAP requests in which is required to send a data array as a
parameter to a function. In general, the xsql script does not require the use of this function outside this ambit.
In general, by their nature, sql scripts do not require the use of this function outside of this scope
1 array.toObject
<array.toObject
name='name'
type='boolean|smallint|integer|long|float|double|decimal|date|time|timestamp|string'
>
<array /> ?
</array.toObject>
Attributes | |||||
---|---|---|---|---|---|
Name | Type | Required | Default | Description | |
Aname | string | Name of the variable of array type.. | |||
Atype | String | Data type of the resulting object. |
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Earray | array | The array object can be referenced by name using the attribute name or it can be passed as an argument of the function. |
Returns | |
---|---|
Type | Description |
Object[] | Returns an Object[] from the original array. |
Example
Generation of an array of integers (int[])
Copy
<xsql-script name='array_toObject'> <body> <println> <array.toObject type='integer'> <array> <number type='integer'>10</number> <number type='integer'>20</number> <number type='integer'>30</number> </array> </array.toObject> </println> </body> </xsql-script>
The result is:
Copy
10 20 30