We have an Oracle type that's declared as such:
CREATE OR REPLACE TYPE its_accountarray;
There is no base type. This type is then used in Procedures and packages (and in Java Stored procedures as an array descriptor). In the procedure/package it uses extend function to add to array.
<declare section>
v_account latax.ITS_ACCOUNTARRAY := new ITS_accountArray();
...
BEGIN
...
...
v_account.extend(1);
and in Java, it's used as: oracle.sql.ARRAY ls_accountARRAY, ls_periodARRAY;
oracle.sql.ArrayDescriptor ad = ArrayDescriptor.createDescriptor(**"ITS_ACCOUNTARRAY"**, oconn);
ls_accountARRAY = new ARRAY(ad, oconn, arg_accounts);
ocs.setARRAY(2, ls_accountARRAY);
I am curious as to how this works. Even though the name has Array in it, it is not defined as an array or table type, like I typically see. It works, but is this a legal usage or should I declare the type to be of some array type explicitly?
Thanks
Sam
CREATE OR REPLACE TYPE its_accountarrayThat's what got me. The body portion "AS TABLE OF..." was not displayed; apparently it put a lot of spaces in between, that body didn't show in view. As I mentioned below, SQL*Plus did show correctly. New version of the tool does better, still with lot of spaces embedded, but at least within the view.