Interface for the connection object obtained by defaultConnection.


  • IConnection


oracleServerVersion: number

This read-only property gives a numeric representation of the Oracle database version which is useful in comparisons. For version a.b.c.d.e, this property gives the number: (100000000 * a) + (1000000 * b) + (10000 * c) + (100 * d) + e

oracleServerVersionString: string

This read-only property gives a string representation of the Oracle database version which is useful for display.

stmtCacheSize: number

This read-only property always returns 0 and exists for consistency with node-oracledb.


  • This call commits the current transaction in progress.

    Returns void

  • This method allows sets of data values to be bound to one DML or PL/SQL statement for execution. It is like calling execute() multiple times but requires fewer context switches. This is an efficient way to handle batch changes, for example when inserting or updating multiple rows. The method cannot be used for queries.

    The executeMany() method supports IN, IN OUT and OUT binds for most data types.

    The version of this function which accepts a number of iterations must be used when no bind parameters are required or when all bind parameters are OUT binds.

    See for more details.


    • sql: string

      SQL or PL/SQL statement that executeMany() executes.

    • binds: BindParameters[]

      contains the values or variables to be bound to the executed statement. It must be an array of arrays (ArrayBindDefs) or an array of objects whose keys match the bind variable names in the SQL statement (IObjectBindDefs). Each sub-array or sub-object must contain values for the bind variables used in the SQL statement. At least one such record must be specified.

      If a record contains fewer values than expected, NULL values will be used. For bind by position, empty values can be specified using syntax like [a,,c,d].

      By default, the direction of binds is BIND_IN. The first data record determines the number of bind variables, each bind variable's data type, and its name (when binding by name). If a variable in the first record contains a null, this value is ignored and a subsequent record is used to determine that variable's characteristics. If all values in all records for a particular bind variable are null, the type of that bind is STRING with a maximum size of 1.

      The maximum sizes of strings and Uint8Arrays are determined by scanning all records in the bind data.

      If a bindDefs property is used in options, no data scanning occurs. This property explicitly specifies the characteristics of each bind variable.

    • Optional options: IExecuteManyOptions

      The options parameter is optional. It can contain the properties specified in IExecuteManyOptions.

    Returns IExecuteManyReturn

  • Parameters

    Returns IExecuteManyReturn

  • Parses a SQL statement and returns information about it. This is most useful for finding column names of queries, and for finding the names of bind variables used.

    This method performs a call to the SQL layer of the database, so unnecessary calls should be avoided.

    The information is provided by lower-level APIs that have some limitations. Some uncommon statements will return the statement type as STMT_TYPE_UNKNOWN. DDL statements are not parsed, so the syntax errors in them will not be reported. The direction and types of bind variables cannot be determined.


    • sql: string

      SQL statement to parse.

    Returns IStatementInfo

  • This call rolls back the current transaction in progress.

    Returns void