Interface for the result of execute().


  • IExecuteReturn


metaData?: IMetaData[]

For SELECT statements, this contains an array of objects describing details of columns for the select list. For non queries, this property is undefined.

outBinds?: any

This contains the output values of OUT and IN OUT binds. If bindParams is passed as an array, then outBinds is returned as an array. If bindParams is passed as an object, then outBinds is returned as an object. If there are no OUT or IN OUT binds, the value is undefined.

resultSet?: IResultSet

For SELECT statements when the resultSet option is true, use the resultSet object to fetch rows. See IResultSet.

When using this option, resultSet.close() must be called when the result set is no longer needed. This is true whether or not rows have been fetched.

rows?: any[]

For SELECT statements using direct fetches, rows contains an array of fetched rows. It will be NULL if there is an error or the SQL statement was not a SELECT statement. By default, the rows are in an array of column value arrays, but this can be changed to arrays of objects by setting outFormat to oracledb.OBJECT. If a single row is fetched, then rows is an array that contains one single row.

The number of rows returned is limited by parameters.maxRows or the maxRows option in an execute() call. If maxRows is 0, then the number of rows is limited by memory constraints.

rowsAffected?: number

For DML statements (including SELECT FOR UPDATE) this contains the number of rows affected, for example the number of rows inserted. For non-DML statements such as queries and PL/SQL statements, rowsAffected is undefined.