Oracle 8 functions OCI8 These functions allow you to access Oracle8 and Oracle7 databases. It uses the Oracle8 Call-Interface (OCI8). You will need the Oracle8 client libraries to use this extension. This extension is more flexible than the standard Oracle extension. It supports binding of global and local PHP variables to Oracle placeholders, has full LOB, FILE and ROWID support and allows you to use user-supplied define variables. Before using this extension, make sure that you have set up your oracle environment variables properly for the Oracle user, as well as your web daemon user. The variables you might need to set are as follows: ORACLE_HOME ORACLE_SID LD_PRELOAD LD_LIBRARY_PATH NLS_LANG ORA_NLS33 After setting up the environment variables for your webserver user, be sure to also add the webserver user (nobody, www) to the oracle group. If your webserver doesn't start or crashes at startup Check that Apache is linked with the pthread library: /lib/libpthread.so.0 (0x4001c000) libm.so.6 => /lib/libm.so.6 (0x4002f000) libcrypt.so.1 => /lib/libcrypt.so.1 (0x4004c000) libdl.so.2 => /lib/libdl.so.2 (0x4007a000) libc.so.6 => /lib/libc.so.6 (0x4007e000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000) ]]> If the libpthread is not listed you have to reinstall Apache: OCI Hints load(); // For INSERT or UPDATE statement use: $sql = "insert into table (field1, field2) values (field1 = 'value', field2 = empty_clob()) returning field2 into :field2"; OCIParse($conn, $sql); $clob = OCINewDescriptor($conn, OCI_D_LOB); OCIBindByName ($stmt, ":field2", &$clob, -1, OCI_B_CLOB); OCIExecute($stmt, OCI_DEFAULT); $clob->save ("some text"); OCICommit($conn); ?> ]]> You can easily access stored procedures in the same way as you would from the commands line. Using Stored Procedures ]]> OCIDefineByName Use a PHP variable for the define-step during a SELECT Description int OCIDefineByName int stmt string Column-Name mixed variable int type OCIDefineByName uses fetches SQL-Columns into user-defined PHP-Variables. Be careful that Oracle user ALL-UPPERCASE column-names, whereby in your select you can also write lower-case. OCIDefineByName expects the Column-Name to be in uppercase. If you define a variable that doesn't exists in you select statement, no error will be given! If you need to define an abstract Datatype (LOB/ROWID/BFILE) you need to allocate it first using OCINewDescriptor function. See also the OCIBindByName function. OCIDefineByName ]]> OCIBindByName Bind a PHP variable to an Oracle Placeholder Description int OCIBindByName int stmt string ph_name mixed &variable int length int type OCIBindByName binds the PHP variable variable to the Oracle placeholder ph_name. Whether it will be used for input or output will be determined run-time, and the necessary storage space will be allocated. The length parameter sets the maximum length for the bind. If you set length to -1 OCIBindByName will use the current length of variable to set the maximum length. If you need to bind an abstract Datatype (LOB/ROWID/BFILE) you need to allocate it first using OCINewDescriptor function. The length is not used for abstract Datatypes and should be set to -1. The type variable tells oracle, what kind of descriptor we want to use. Possible values are: OCI_B_FILE (Binary-File), OCI_B_CFILE (Character-File), OCI_B_CLOB (Character-LOB), OCI_B_BLOB (Binary-LOB) and OCI_B_ROWID (ROWID). OCIDefineByName "Larry", 2222 => "Bill", 3333 => "Jim"); $rowid = OCINewDescriptor($conn,OCI_D_ROWID); OCIBindByName($stmt,":empno",&$empno,32); OCIBindByName($stmt,":ename",&$ename,32); OCIBindByName($stmt,":rid",&$rowid,-1,OCI_B_ROWID); $update = OCIParse($conn,"update emp set sal = :sal where ROWID = :rid"); OCIBindByName($update,":rid",&$rowid,-1,OCI_B_ROWID); OCIBindByName($update,":sal",&$sal,32); $sal = 10000; while (list($empno,$ename) = each($data)) { OCIExecute($stmt); OCIExecute($update); } $rowid->free(); OCIFreeStatement($update); OCIFreeStatement($stmt); $stmt = OCIParse($conn,"select * from emp where empno in (1111,2222,3333)"); OCIExecute($stmt); while (OCIFetchInto($stmt,&$arr,OCI_ASSOC)) { var_dump($arr); } OCIFreeStatement($stmt); /* delete our "junk" from the emp table.... */ $stmt = OCIParse($conn,"delete from emp where empno in (1111,2222,3333)"); OCIExecute($stmt); OCIFreeStatement($stmt); OCILogoff($conn); ?> ]]> It is a bad idea to use magic quotes and OciBindByName simultaneously as no quoting is needed on quoted variables and any quotes magically applied will be written into your database as OciBindByName is not able to distinguish magically added quotings from those added by intention. OCILogon Establishes a connection to Oracle Description int OCILogon string username string password string db OCILogon returns an connection identifier needed for most other OCI calls. The optional third parameter can either contain the name of the local Oracle instance or the name of the entry in tnsnames.ora to which you want to connect. If the optional third parameter is not specified, PHP uses the environment variables ORACLE_SID (Oracle instance) or TWO_TASK (tnsnames.ora) to determine which database to connect to. Connections are shared at the page level when using OCILogon. This means that commits and rollbacks apply to all open transactions in the page, even if you have created multiple connections. This example demonstrates how the connections are shared. OCILogon
";
$db = "";

$c1 = ocilogon("scott","tiger",$db);
$c2 = ocilogon("scott","tiger",$db);

function create_table($conn)
{ $stmt = ociparse($conn,"create table scott.hallo (test varchar2(64))");
  ociexecute($stmt);
  echo $conn." created table\n\n";
}

function drop_table($conn)
{ $stmt = ociparse($conn,"drop table scott.hallo");
  ociexecute($stmt);
  echo $conn." dropped table\n\n";
}

function insert_data($conn)
{ $stmt = ociparse($conn,"insert into scott.hallo 
            values('$conn' || ' ' || to_char(sysdate,'DD-MON-YY HH24:MI:SS'))");
  ociexecute($stmt,OCI_DEFAULT);
  echo $conn." inserted hallo\n\n";
}

function delete_data($conn)
{ $stmt = ociparse($conn,"delete from scott.hallo");
  ociexecute($stmt,OCI_DEFAULT);
  echo $conn." deleted hallo\n\n";
}

function commit($conn)
{ ocicommit($conn);
  echo $conn." committed\n\n";
}

function rollback($conn)
{ ocirollback($conn);
  echo $conn." rollback\n\n";
}

function select_data($conn)
{ $stmt = ociparse($conn,"select * from scott.hallo");
  ociexecute($stmt,OCI_DEFAULT);
  echo $conn."----selecting\n\n";
  while (ocifetch($stmt))
    echo $conn." <".ociresult($stmt,"TEST").">\n\n";
  echo $conn."----done\n\n";
}

create_table($c1);
insert_data($c1);   // Insert a row using c1
insert_data($c2);   // Insert a row using c2

select_data($c1);   // Results of both inserts are returned
select_data($c2);   

rollback($c1);      // Rollback using c1

select_data($c1);   // Both inserts have been rolled back
select_data($c2);   

insert_data($c2);   // Insert a row using c2
commit($c2);        // commit using c2

select_data($c1);   // result of c2 insert is returned

delete_data($c1);   // delete all rows in table using c1
select_data($c1);   // no rows returned
select_data($c2);   // no rows returned
commit($c1);        // commit using c1

select_data($c1);   // no rows returned
select_data($c2);   // no rows returned


drop_table($c1);
print "
"; ?> ]]>
See also OCIPLogon and OCINLogon.
OCIPLogon Connect to an Oracle database and log on using a persistent connection. Returns a new session. Description int OCIPLogon string username string password string db OCIPLogon creates a persistent connection to an Oracle 8 database and logs on. The optional third parameter can either contain the name of the local Oracle instance or the name of the entry in tnsnames.ora to which you want to connect. If the optional third parameter is not specified, PHP uses the environment variables ORACLE_SID (Oracle instance) or TWO_TASK (tnsnames.ora) to determine which database to connect to. See also OCILogon and OCINLogon. OCINLogon Connect to an Oracle database and log on using a new connection. Returns a new session. Description int OCINLogon string username string password string db OCINLogon creates a new connection to an Oracle 8 database and logs on. The optional third parameter can either contain the name of the local Oracle instance or the name of the entry in tnsnames.ora to which you want to connect. If the optional third parameter is not specified, PHP uses the environment variables ORACLE_SID (Oracle instance) or TWO_TASK (tnsnames.ora) to determine which database to connect to. OCINLogon forces a new connection. This should be used if you need to isolate a set of transactions. By default, connections are shared at the page level if using OCILogon or at the web server process level if using OCIPLogon. If you have multiple connections open using OCINLogon, all commits and rollbacks apply to the specified connection only. This example demonstrates how the connections are separated. OCINLogon
";
$db = "";

$c1 = ocilogon("scott","tiger",$db);
$c2 = ocinlogon("scott","tiger",$db);

function create_table($conn)
{ $stmt = ociparse($conn,"create table scott.hallo (test
varchar2(64))");
  ociexecute($stmt);
  echo $conn." created table\n\n";
}

function drop_table($conn)
{ $stmt = ociparse($conn,"drop table scott.hallo");
  ociexecute($stmt);
  echo $conn." dropped table\n\n";
}

function insert_data($conn)
{ $stmt = ociparse($conn,"insert into scott.hallo 
            values('$conn' || ' ' || to_char(sysdate,'DD-MON-YY HH24:MI:SS'))");
  ociexecute($stmt,OCI_DEFAULT);
  echo $conn." inserted hallo\n\n";
}

function delete_data($conn)
{ $stmt = ociparse($conn,"delete from scott.hallo");
  ociexecute($stmt,OCI_DEFAULT);
  echo $conn." deleted hallo\n\n";
}

function commit($conn)
{ ocicommit($conn);
  echo $conn." committed\n\n";
}

function rollback($conn)
{ ocirollback($conn);
  echo $conn." rollback\n\n";
}

function select_data($conn)
{ $stmt = ociparse($conn,"select * from scott.hallo");
  ociexecute($stmt,OCI_DEFAULT);
  echo $conn."----selecting\n\n";
  while (ocifetch($stmt))
    echo $conn." <".ociresult($stmt,"TEST").">\n\n";
  echo $conn."----done\n\n";
}

create_table($c1);
insert_data($c1);

select_data($c1);   
select_data($c2);   

rollback($c1);      

select_data($c1);   
select_data($c2);   

insert_data($c2);   
commit($c2);        

select_data($c1);   

delete_data($c1);   
select_data($c1);   
select_data($c2);   
commit($c1);        

select_data($c1);
select_data($c2);


drop_table($c1);
print "
"; ?> ]]>
See also OCILogon and OCIPLogon.
OCILogOff Disconnects from Oracle Description int OCILogOff int connection OCILogOff closes an Oracle connection. OCIExecute Execute a statement Description int OCIExecute int statement int mode OCIExecute executes a previously parsed statement. (see OCIParse. The optional mode allows you to specify the execution-mode (default is OCI_COMMIT_ON_SUCCESS). If you don't want statements to be committed automaticly specify OCI_DEFAULT as your mode. OCICommit Commits outstanding transactions Description int OCICommit int connection OCICommit commits all outstanding statements for Oracle connection connection. OCIRollback Rolls back outstanding transactions Description int OCIRollback int connection OCIRollback rolls back all outstanding statements for Oracle connection connection. OCINewDescriptor Initialize a new empty descriptor LOB/FILE (LOB is default) Description string OCINewDescriptor int connection int type OCINewDescriptor Allocates storage to hold descriptors or LOB locators. Valid values for the valid type are OCI_D_FILE, OCI_D_LOB, OCI_D_ROWID. For LOB descriptors, the methods load, save, and savefile are associated with the descriptor, for BFILE only the load method exists. See the second example usage hints. OCINewDescriptor ]]> * * ... */ if(!isset($lob_upload) || $lob_upload == 'none'){ ?>
Upload file:
-
savefile($lob_upload)){ OCICommit($conn); echo "Blob successfully uploaded\n"; }else{ echo "Couldn't upload Blob\n"; } OCIFreeDesc($lob); OCIFreeStatement($stmt); OCILogoff($conn); } ?> ]]>
OCINewDescriptor = 4.0.6). * Example PL/SQL stored procedure signature is: * * PROCEDURE save_data * Argument Name Type In/Out Default? * ------------------------------ ----------------------- ------ -------- * KEY NUMBER(38) IN * DATA CLOB IN * */ $conn = OCILogon($user, $password); $stmt = OCIParse($conn, "begin save_data(:key, :data); end;"); $clob = OCINewDescriptor($conn, OCI_D_LOB); OCIBindByName($stmt, ':key', $key); OCIBindByName($stmt, ':data', $clob, -1, OCI_B_CLOB); $clob->WriteTemporary($data); OCIExecute($stmt, OCI_DEFAULT); OCICommit($conn); $clob->close(); $clob->free(); OCIFreeStatement($stmt); ?> ]]>
OCIRowCount Gets the number of affected rows Description int OCIRowCount int statement OCIRowCount returns the number of rows affected for eg update-statements. This function will not tell you the number of rows that a select will return! OCIRowCount
";
    $conn = OCILogon("scott","tiger");
    $stmt = OCIParse($conn,"create table emp2 as select * from emp");
    OCIExecute($stmt);
    print OCIRowCount($stmt) . " rows inserted.
"; OCIFreeStatement($stmt); $stmt = OCIParse($conn,"delete from emp2"); OCIExecute($stmt); print OCIRowCount($stmt) . " rows deleted.
"; OCICommit($conn); OCIFreeStatement($stmt); $stmt = OCIParse($conn,"drop table emp2"); OCIExecute($stmt); OCIFreeStatement($stmt); OCILogOff($conn); print "
"; ?> ]]>
OCINumCols Return the number of result columns in a statement Description int OCINumCols int stmt OCINumCols returns the number of columns in a statement OCINumCols
\n";   
    $conn = OCILogon("scott", "tiger");
    $stmt = OCIParse($conn,"select * from emp");
    OCIExecute($stmt);
    while ( OCIFetch($stmt) ) {
        print "\n";   
        $ncols = OCINumCols($stmt);
        for ( $i = 1; $i <= $ncols; $i++ ) {
            $column_name  = OCIColumnName($stmt,$i);
            $column_value = OCIResult($stmt,$i);
            print $column_name . ': ' . $column_value . "\n";
        }
        print "\n";
    }
    OCIFreeStatement($stmt);  
    OCILogoff($conn);   
    print "
"; print "\n"; ?> ]]>
OCIResult Returns column value for fetched row Description mixed OCIResult int statement mixed column OCIResult returns the data for column column in the current row (see OCIFetch).OCIResult will return everything as strings except for abstract types (ROWIDs, LOBs and FILEs). OCIFetch Fetches the next row into result-buffer Description int OCIFetch int statement OCIFetch fetches the next row (for SELECT statements) into the internal result-buffer. OCIFetchInto Fetches the next row into result-array Description int OCIFetchInto int stmt array &result int mode OCIFetchInto fetches the next row (for SELECT statements) into the result array. OCIFetchInto will overwrite the previous content of result. By default result will contain a zero-based array of all columns that are not &null;. The mode parameter allows you to change the default behaviour. You can specify more than one flag by simply adding them up (eg OCI_ASSOC+OCI_RETURN_NULLS). The known flags are: OCI_ASSOC Return an associative array. OCI_NUM Return an numbered array starting with zero. (DEFAULT) OCI_RETURN_NULLS Return empty columns. OCI_RETURN_LOBS Return the value of a LOB instead of the descriptor. OCIFetchStatement Fetch all rows of result data into an array. Description int OCIFetchStatement int stmt array &variable OCIFetchStatement fetches all the rows from a result into a user-defined array. OCIFetchStatement returns the number of rows fetched. OCIFetchStatement 0 ) { print "\n"; print "\n"; while ( list( $key, $val ) = each( $results ) ) { print "\n"; } print "\n"; for ( $i = 0; $i < $nrows; $i++ ) { reset($results); print "\n"; while ( $column = each($results) ) { $data = $column['value']; print "\n"; } print "\n"; } print "
$key
$data[$i]
\n"; } else { echo "No data found
\n"; } print "$nrows Records Selected
\n"; OCIFreeStatement($stmt); OCILogoff($conn); ?> ]]>
OCIColumnIsNULL test whether a result column is &null; Description int OCIColumnIsNULL int stmt mixed column OCIColumnIsNULL returns &true; if the returned column column in the result from the statement stmt is &null;. You can either use the column-number (1-Based) or the column-name for the col parameter. OCIColumnName Returns the name of a column. Description string OCIColumnName int stmt int col OCIColumnName returns the name of the column corresponding to the column number (1-based) that is passed in. OCIColumnName
\n";   
    $conn = OCILogon("scott", "tiger");
    $stmt = OCIParse($conn,"select * from emp");
    OCIExecute($stmt);
    print "";
    print "";
    print "";
    print "";
    print "";
    print "";
    $ncols = OCINumCols($stmt);
    for ( $i = 1; $i <= $ncols; $i++ ) {
        $column_name  = OCIColumnName($stmt,$i);
        $column_type  = OCIColumnType($stmt,$i);
        $column_size  = OCIColumnSize($stmt,$i);
        print "";
        print "";
        print "";
        print "";
        print "";
    }
    OCIFreeStatement($stmt);  
    OCILogoff($conn);   
    print "";
    print "\n"; 
?>   
]]>
      
     See also OCINumCols,
     OCIColumnType, 
     and OCIColumnSize.
    
   
    OCIColumnSize
    return result column size
   
   
    Description
    
     
      int OCIColumnSize
      int stmt
      mixed column
     
    
    
     OCIColumnSize returns the size of the column
     as given by Oracle. You can either use
	 the column-number (1-Based) or the column-name for the
	 col parameter.
    
    
     
      OCIColumnSize
      
\n";   
    $conn = OCILogon("scott", "tiger");
    $stmt = OCIParse($conn,"select * from emp");
    OCIExecute($stmt);
    print "
NameTypeLength
$column_name$column_type$column_size
"; print ""; print ""; print ""; print ""; print ""; $ncols = OCINumCols($stmt); for ( $i = 1; $i <= $ncols; $i++ ) { $column_name = OCIColumnName($stmt,$i); $column_type = OCIColumnType($stmt,$i); $column_size = OCIColumnSize($stmt,$i); print ""; print ""; print ""; print ""; print ""; } print "
NameTypeLength
$column_name$column_type$column_size
"; OCIFreeStatement($stmt); OCILogoff($conn); print "
"; print "\n"; ?> ]]>
See also OCINumCols, OCIColumnName, and OCIColumnSize.
OCIColumnType Returns the data type of a column. Description mixed OCIColumnType int stmt int col OCIColumnType returns the data type of the column corresponding to the column number (1-based) that is passed in. OCIColumnType
\n";   
    $conn = OCILogon("scott", "tiger");
    $stmt = OCIParse($conn,"select * from emp");
    OCIExecute($stmt);
    print "";
    print "";
    print "";
    print "";
    print "";
    print "";
    $ncols = OCINumCols($stmt);
    for ( $i = 1; $i <= $ncols; $i++ ) {
        $column_name  = OCIColumnName($stmt,$i);
        $column_type  = OCIColumnType($stmt,$i);
        $column_size  = OCIColumnSize($stmt,$i);
        print "";
        print "";
        print "";
        print "";
        print "";
    }
    OCIFreeStatement($stmt);  
    OCILogoff($conn);   
    print "";
    print "\n"; 
?>   
]]>
      
     See also OCINumCols,
     OCIColumnName, 
     and OCIColumnSize.
    
   
    OCIServerVersion
    Return a string containing server version
    information.
   
   
    Description
    
     
      string OCIServerVersion
      int conn
     
    
    
     
      OCIServerVersion
      

]]>
      
     
    
   
  
   
    OCIStatementType
    Return the type of an OCI statement.
   
   
    Description
    
     
      string OCIStatementType
      int stmt
     
    
    
     OCIStatementType returns one of the following
     values:
     
      			"SELECT"
      			"UPDATE"
      			"DELETE"
      			"INSERT"
      			"CREATE"
      			"DROP"
      			"ALTER"
      			"BEGIN"
      			"DECLARE"
      			"UNKNOWN"
     
    
     
      Code examples
      
";
    $conn = OCILogon("scott","tiger");
    $sql  = "delete from emp where deptno = 10";
   
    $stmt = OCIParse($conn,$sql);
    if ( OCIStatementType($stmt) == "DELETE" ) {
        die "You are not allowed to delete from this table
"; } OCILogoff($conn); print "
"; ?> ]]>
OCINewCursor Return a new cursor (Statement-Handle) - use to bind ref-cursors. Description int OCINewCursor int conn OCINewCursor allocates a new statement handle on the specified connection. Using a REF CURSOR from a stored procedure ]]> Using a REF CURSOR in a select statement "; $conn = OCILogon("scott","tiger"); $count_cursor = "CURSOR(select count(empno) num_emps from emp " . "where emp.deptno = dept.deptno) as EMPCNT from dept"; $stmt = OCIParse($conn,"select deptno,dname,$count_cursor"); ociexecute($stmt); print "
NameTypeLength
$column_name$column_type$column_size
"; print ""; print ""; print ""; print ""; print ""; while (OCIFetchInto($stmt,&$data,OCI_ASSOC)) { print ""; $dname = $data["DNAME"]; $deptno = $data["DEPTNO"]; print ""; print ""; ociexecute($data[ "EMPCNT" ]); while (OCIFetchInto($data[ "EMPCNT" ],&$subdata,OCI_ASSOC)) { $num_emps = $subdata["NUM_EMPS"]; print ""; } print ""; } print "
DEPT NAMEDEPT ## EMPLOYEES
$dname$deptno$num_emps
"; print ""; OCIFreeStatement($stmt); OCILogoff($conn); ?> ]]> OCIFreeStatement Free all resources associated with a statement. Description int OCIFreeStatement int stmt OCIFreeStatement returns &true; if successful, or &false; if unsuccessful. OCIFreeCursor Free all resources associated with a cursor. Description int OCIFreeCursor int stmt OCIFreeCursor returns &true; if successful, or &false; if unsuccessful. OCIFreeDesc Deletes a large object descriptor. Description int OCIFreeDesc object lob OCIFreeDesc returns &true; if successful, or &false; if unsuccessful. OCIParse Parse a query and return a statement Description int OCIParse int conn string query OCIParse parses the query using conn. It returns the statement identity if the query is valid, &false; if not. The query can be any valid SQL statement. OCIError Return the last error of stmt|conn|global. If no error happened returns &false;. Description array OCIError int stmt|conn|global OCIError returns the last error found. If the optional stmt|conn|global is not provided, the last error encountered is returned. If no error is found, OCIError returns &false;. OCIError returns the error as an associative array. In this array, code consists the oracle error code and message the oracle errorstring. OCIInternalDebug Enables or disables internal debug output. By default it is disabled Description void OCIInternalDebug int onoff OCIInternalDebug enables internal debug output. Set onoff to 0 to turn debug output off, 1 to turn it on. OCICancel Cancel reading from cursor Description int OCICancel int stmt If you do not want read more data from a cursor, then call OCICancel. OCISetPrefetch sets number of rows to be prefetched Description int OCISetPrefetch int stmt int rows Sets the number of top level rows to be prefetched. The default value is 1 row. OCIWriteLobToFile Coming soon. Description void OCIWriteLobToFile object lob string filename int start int lenght Coming soon. OCISaveLobFile Coming soon. Description string OCISaveLobFile object lob Coming soon. OCISaveLob Coming soon. Description string OCISaveLob object lob Coming soon. OCILoadLob Coming soon. Description string OCILoadLob object lob Coming soon. OCIColumnScale Coming soon. Description int OCIColumnScale int stmt int col Coming soon. OCIColumnPrecision Coming soon. Description int OCIColumnPrecision int stmt int col Coming soon. OCIColumnTypeRaw Coming soon. Description mixed OCIColumnTypeRaw int stmt int col Coming soon. OCINewCollection Coming soon. Description string OCINewCollection int conn string tdo string shema Coming soon. OCIFreeCollection Coming soon. Description string OCIFreeCollection object lob Coming soon. OCICollAssign Coming soon. Description string OCICollAssign object collection object object Coming soon. OCICollAppend Coming soon. Description string OCICollAppend object collection object object Coming soon. OCICollAssignElem Coming soon. Description string OCICollAssignElem object collection string ndx string val Coming soon. OCICollGetElem Coming soon. Description string OCICollGetElem object collection string ndx Coming soon. OCICollMax Coming soon. Description string OCICollMax object collection Coming soon. OCICollSize Coming soon. Description string OCICollSize object collection Coming soon. OCICollTrim Coming soon. Description string OCICollTrim object collection int num Coming soon.