Abstract
Readonly
oracleThis 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
Readonly
oracleThis read-only property gives a string representation of the Oracle database version which is useful for display.
Readonly
stmtThis read-only property always returns 0 and exists for consistency with node-oracledb.
Abstract
commitAbstract
executeThis call executes a single SQL or PL/SQL statement.
The statement to be executed may contain IN binds, OUT or IN OUT bind values or variables, which are bound using either an object or an array.
The function returns a result object, containing any fetched rows, the values of any OUT and IN OUT bind variables, and the number of rows affected by the execution of DML statements, see IExecuteReturn.
See https://node-oracledb.readthedocs.io/en/v6.4.0/api_manual/connection.html#connection.execute for more details.
This parameter can either be a string or an object. If the parameter is a string, then it is the SQL statement to be executed. The statement may contain bind parameters.
If the parameter is an object (possible since Oracle 23.5), it conforms to the IExecuteArgs interface and contains the SQL statement to be executed and the bind values.
Oracle 23.5
Optional
options: IExecuteOptionsOptional
options: IExecuteOptionsAbstract
executeThis 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 that accepts a number of iterations must be used when no bind parameters are required or when all bind parameters are OUT binds.
See https://github.com/oracle/node-oracledb/blob/v3.1.0/doc/api.md#-427-connectionexecutemany for more details.
SQL or PL/SQL statement that executeMany() executes.
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: IExecuteManyOptionsThe options parameter is optional. It can contain the properties specified in IExecuteManyOptions.
Optional
options: IExecuteManyOptionsAbstract
getReturns a DbObject prototype object representing the named Oracle Database object or collection.
Oracle 23.3
The name of the Oracle object or collection.
Abstract
getReturns a parent SodaDatabase object.
https://github.com/oracle/node-oracledb/blob/v5.0.0/doc/api.md#getsodadatabase
a new SodaDatabase object.
Abstract
getParses 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 for performance reasons.
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 statement to parse.
Abstract
rollback
Interface for the connection object obtained by defaultConnection.