By default, node-oracledb runs in a 'Thin' mode which connects directly to Oracle Database. This mode does not need Oracle Client libraries. However, when the driver does use these libraries to communicate to Oracle Database, then node-oracledb is said to be in 'Thick' mode and has additional
functionality <featuresummary>
available. See thickarch
for the architecture diagram.
This section lists the Oracle Database features <featuresummary>
that are supported by node-oracledb Thin and Thick modes and the notable differences <modediff>
between the two modes.
The following table summarizes the Oracle Database features supported by node-oracledb Thin and Thick modes. For more details see modediff
.
Features Supported in node-oracledb Thin and Thick Modes
- Oracle Feature
- node-oracledb Thin Mode
- node-oracledb Thick Mode
- Oracle Client version
- Not applicable
- Release 11.2 and later
- Oracle Database version
- Release 12.1 and later
- Release 9.2 and later depending on the Oracle Client library version
- Oracle Client/Database version interoperability
- Not applicable - Connects directly to database version 12.1 and later
- Yes
- Natively written in JavaScript
- Yes
- No - Uses a C library called Oracle Database Programming Interface for C (ODPI-C) which internally calls Oracle Call Interface (OCI), the native C interface for Oracle Database
- Thin mode
- Yes - Direct Oracle Network calls
- No - Uses Oracle Client libraries
- Standalone connections (see
standaloneconnection
) - Yes
- Yes
- Standalone connections (see
- Connection pooling - Heterogeneous and Homogeneous (see
Connection pooling <connpooling>
) - Homogeneous only
- Yes
- Connection pooling - Heterogeneous and Homogeneous (see
- Connection pool draining (see
Connection draining <conpooldraining>
) - Yes
- Yes
- Connection pool draining (see
- Connection pool session state callback (
sessionfixupnode
) - Yes - JavaScript functions but not PL/SQL functions
- Yes
- Connection pool session state callback (
- Connection pool session tagging (see
connpooltagging
) - No
- Yes
- Connection pool session tagging (see
- Proxy connections (see
proxyauth
) - Yes
- Yes
- Proxy connections (see
- Set the current schema using an attribute
- Yes
- Yes
- External authentication (see
extauth
) - No
- Yes
- External authentication (see
- Connection mode privileges (see
oracledbconstantsprivilege
) - Yes
- Yes
- Connection mode privileges (see
- Preliminary connections
- No
- Yes
- Real Application Clusters (RAC) (see
connectionrac
) - Yes
- Yes
- Real Application Clusters (RAC) (see
- Oracle Sharded Databases (see
sharding
) - No
- Yes - No TIMESTAMP support
- Oracle Sharded Databases (see
- Connection Pool Connection Load Balancing (CLB)
- Yes
- Yes
- Connection Pool Runtime Load Balancing (RLB) (see
connectionrlb
) - No
- Yes
- Connection Pool Runtime Load Balancing (RLB) (see
- Oracle Cloud Infrastructure (OCI) Identity and Access Management (IAM) Tokens (see
iamtokenbasedauthentication
) - Yes
- Yes - In connection string with appropriate Oracle Client
- Oracle Cloud Infrastructure (OCI) Identity and Access Management (IAM) Tokens (see
- Open Authorization (OAuth 2.0) (see
oauthtokenbasedauthentication
) - Yes
- Yes
- Open Authorization (OAuth 2.0) (see
- Kerberos, Radius, and Public Key Infrastructure (PKI) authentication services
- No
- Yes
- Oracle Database Native Network Encryption and Checksumming (see
nne
) - No
- Yes
- Oracle Database Native Network Encryption and Checksumming (see
- Connection pinging API (see
connection.ping()
) - Yes
- Yes
- Connection pinging API (see
- Oracle Net Services
tnsnames.ora
file (seetnsadmin
) - Yes
- Yes
- Oracle Net Services
- Oracle Net Services
sqlnet.ora
file (seetnsadmin
) - No - A few values can be set in Easy Connect string
- Yes
- Oracle Net Services
- Oracle Client library configuration file
oraaccess.xml
(seeoraaccess
) - No
- Yes
- Oracle Client library configuration file
- Easy Connect connection strings (see
easyconnect
) - Yes - Unknown settings are ignored and not passed to Oracle Database
- Yes
- Easy Connect connection strings (see
- Oracle Cloud Database connectivity (see
connectionadb
) - Yes
- Yes
- Oracle Cloud Database connectivity (see
- One-way TLS connections (see
connectionadbtls
) - Yes
- Yes
- One-way TLS connections (see
- Mutual TLS (mTLS) connections (see
connectionadbmtls
) - Yes - Needs a PEM format wallet
- Yes
- Mutual TLS (mTLS) connections (see
- Oracle Database Dedicated Servers, Shared Servers, and Database Resident Connection Pooling (DRCP) (see
drcp
) - Yes
- Yes
- Oracle Database Dedicated Servers, Shared Servers, and Database Resident Connection Pooling (DRCP) (see
- Oracle Database 23ai Implicit connection pooling for DRCP and PRCP (see
implicitpool
) - Yes
- Yes
- Oracle Database 23ai Implicit connection pooling for DRCP and PRCP (see
- Multitenant Databases
- Yes
- Yes
- CMAN and CMAN-TDM connectivity
- Yes
- Yes
- Bequeath connections
- No
- Yes
- Password changing (see
connection.changePassword()
) - Yes
- Yes
- Password changing (see
- Statement break/reset (see
connection.break()
) - Yes - Out-of-Band (OOB) Connection Breaks not supported
- Yes
- Statement break/reset (see
- Edition Based Redefinition (EBR) (see
ebr
) - No
- Yes
- Edition Based Redefinition (EBR) (see
- SQL execution (see
sqlexecution
) - Yes - Bind and fetch all types except BFILE
- Yes
- SQL execution (see
- PL/SQL execution (see
plsqlexecution
) - Yes - For scalar types and collection types using array interface
- Yes
- PL/SQL execution (see
- Bind variables for data binding (see
bind
) - Yes
- Yes
- Bind variables for data binding (see
- Array DML binding for bulk DML and PL/SQL (also called executeMany()) (see
batchexecution
) - Yes
- Yes
- Array DML binding for bulk DML and PL/SQL (also called executeMany()) (see
- SQL and PL/SQL type and collections (see
fetchobjects
) - Yes
- Yes
- SQL and PL/SQL type and collections (see
- Query column metadata (see
querymeta
) - Yes
- Yes
- Query column metadata (see
- Client character set support (see
charset
) - UTF-8
- UTF-8
- Client character set support (see
- Oracle Globalization support (see
nls
) - No - All Oracle NLS environment variables are ignored
- Yes - Oracle NLS environment variables are respected except the character set in
NLS_LANG
- Oracle Globalization support (see
- Statement caching (see
stmtcache
) - Yes
- Yes
- Statement caching (see
- Row prefetching on first query execute (see
oracledb.prefetchRows
) - Yes
- Yes
- Row prefetching on first query execute (see
- Array fetching for queries (see
oracledb.fetchArraySize
) - Yes
- Yes
- Array fetching for queries (see
- Client Result Caching (CRC) (see
clientresultcache
) - No
- Yes
- Client Result Caching (CRC) (see
- In-band notifications
- Yes
- Yes
- Continuous Query Notification (CQN) (see
cqn
) - No
- Yes
- Continuous Query Notification (CQN) (see
- Advanced Queuing (AQ) (see
aq
) - No
- Yes
- Advanced Queuing (AQ) (see
- AQ: Transactional Event Queue (TxEventQ)
- No
- Yes
- Call timeouts (see
connection.callTimeout
) - Yes
- Yes
- Call timeouts (see
- Oracle Database startup and shutdown (see
startupshutdown
) - No
- Yes
- Oracle Database startup and shutdown (see
- Transaction management (see
transactionmgt
) - Yes - Property
~oracledb.autoCommit
is false - Yes
- Transaction management (see
- Automatic Diagnostic Repository (ADR)
- No
- Yes
- Events mode for notifications
- No
- Yes
- Fast Application Notification (FAN) (see
connectionfan
) - No
- Yes
- Fast Application Notification (FAN) (see
- Transparent Application Failover (TAF)
- No
- Yes - No callback
- Transaction Guard (TG)
- No
- Yes
- Data Guard (DG) and Active Data Guard (ADG)
- Yes
- Yes
- Application Continuity (AC) and Transparent Application Continuity (TAC) (see
appcontinuity
) - No
- Yes
- Application Continuity (AC) and Transparent Application Continuity (TAC) (see
- End-to-end monitoring and tracing attributes (see
tracingsql
) - Yes
- Yes
- End-to-end monitoring and tracing attributes (see
- Java Debug Wire Protocol for debugging PL/SQL (see
jdwp
) - Yes - Using the connection parameter
debugJdwp
or theORA_DEBUG_JDWP
environment variable - Yes - Using the the
ORA_DEBUG_JDWP
environment variable
- Java Debug Wire Protocol for debugging PL/SQL (see
- Feature tracking
- No
- Yes
- Two-phase Commit (TPC) (see
twopc
) - No
- Yes
- Two-phase Commit (TPC) (see
- REF CURSORs (see
refcursors
) - Yes
- Yes
- REF CURSORs (see
- Nested Cursors (see
nestedcursors
) - Yes
- Yes
- Nested Cursors (see
- Pipelined table functions (see
pipelined table functions <pipelinedfunction>
) - Yes
- Yes
- Pipelined table functions (see
- Implicit Result Sets (see
implicitresults
) - Yes
- Yes
- Implicit Result Sets (see
- Application Contexts
- No
- No
- Persistent and Temporary LOBs
- Yes
- Yes
- LOB prefetching
- No
- No - Does have LOB length prefetch
- LOB locator operations such as trim (see
lobclass
) - Yes - Only read and write operations supported
- Yes - Only read operations supported
- LOB locator operations such as trim (see
- INTERVAL DAY TO SECOND data type (see
oracledbconstantsdbtype
) - No
- No
- INTERVAL DAY TO SECOND data type (see
- INTERVAL YEAR TO MONTH data type (see
oracledbconstantsdbtype
) - No
- No
- INTERVAL YEAR TO MONTH data type (see
- Simple Oracle Document Access (SODA) (see
SODA <sodaoverview>
) - No
- Yes
- Simple Oracle Document Access (SODA) (see
- Oracle Database 12c JSON (as BLOB) (see
json12ctype
) - Yes
- Yes
- Oracle Database 12c JSON (as BLOB) (see
- Oracle Database 21c JSON data type (see
json21ctype
) - Yes
- Yes
- Oracle Database 21c JSON data type (see
- Oracle Database 23ai JSON duality view
- Yes
- Yes
- Oracle Database 23ai BOOLEAN data type (see
oracledbconstantsdbtype
) - Yes
- Yes
- Oracle Database 23ai BOOLEAN data type (see
- ROWID, UROWID data types (see
oracledbconstantsdbtype
) - Yes
- Yes
- ROWID, UROWID data types (see
- XMLType data type (see
xmltype
) - Yes
- Yes - May need to fetch as CLOB
- XMLType data type (see
- BFILE data type
- No
- No
- TIMESTAMP WITH TIME ZONE data type (see
oracledbconstantsdbtype
) - Yes
- Yes
- TIMESTAMP WITH TIME ZONE data type (see
- NCHAR, NVARCHAR2, NCLOB data types (see
oracledbconstantsdbtype
) - Yes
- Yes
- NCHAR, NVARCHAR2, NCLOB data types (see
- Oracle Database 23c VECTOR data type (see
oracledbconstantsdbtype
) - Yes
- Yes
- Oracle Database 23c VECTOR data type (see
- Bind PL/SQL Boolean
- Yes
- Yes
- Parallel Queries
- No
- Yes
- Async/Await, Promises, Callbacks and Streams
- Yes
- Yes
- OS Authentication
- No
- Yes
- Batch Errors
- Yes
- Yes
- Database objects (see
objects
) - Yes
- Yes
- Database objects (see
- Restricted Rowid
- No
- Yes
This section details the differences between the node-oracledb Thin and Thick modes. Also, see the summary feature comparison table in featuresummary
.
Node-oracledb can create connections in either the Thin mode or the Thick mode. However, only one of these modes can be used in each Node.js process.
- By default, node-oracledb runs in a 'Thin' mode which connects directly to Oracle Database. This mode does not need Oracle Client libraries. See
thinarch
. - If
oracledb.initOracleClient()
is called in your application before any standalone connections or pool is created, then the node-oracledb mode changes toThick mode <enablingthick>
. Calling theinitOracleClient()
method immediately loads Oracle Client libraries. Someadditional functionality <featuresummary>
is available when node-oracledb uses the Oracle Client libraries. Seethickarch
.
In node-oracedb Thin mode, an unclosed standalone connection takes several seconds to terminate after the query results are printed. This does not occur if connection.close()
is explicitly called. The node-oracledb Thick mode does not use event handlers to manage its connections and does not run into this issue. However, the Thick mode does not close connections until garbage collection occurs or it may not close the connection if the process terminates before garbage collection occurs. It is recommended to explicitly close standalone connections using connection.close()
in both the Thin and Thick modes.
In node-oracledb Thin mode, there is no concept of a local database. Bequeath connections cannot be made since Oracle Client libraries are not used. The Thin mode does not de-reference environment variables such as ORACLE_SID
, TWO_TASK
, or LOCAL
(the latter is specific to Windows). A connection string, or equivalent, must always be used.
In the node-oracledb Thin mode:
The
tnsnames.ora
file will be read. The directory can be set using:- The
TNS_ADMIN
environment variable - The
configDir
property of thegetConnection() <getconnectiondbattrsconfigdir>
orcreatePool() <createpoolpoolattrsconfigdir>
functions
The default file locations such as Instant Client
network/admin/
subdirectory,$ORACLE_HOME/network/admin/
, or$ORACLE_BASE/homes/XYZ/network/admin/
(in a read-only Oracle Database home) will not be used automatically by the Thin mode.- The
- Any
sqlnet.ora
file will not be read. Instead, pass equivalent settings when connecting. - There is no support for
oraaccess.xml
since there are no Oracle Client libraries.
See tnsadmin
and oraaccess
for more information.
The node-oracledb Thin mode accepts connection strings in the same formats as the Oracle Client libraries used by Thick mode does, but not all Oracle Net keywords will be supported.
The following table lists the parameters that are recognized in Thin mode either in Easy Connect Strings or in Full Connect Descriptor Strings that are either explicitly passed or referred to by a tnsnames.ora
alias. All unrecognized parameters are ignored.
Oracle Net Keywords Supported in the node-oracledb Thin Mode
- Oracle Net Keyword
- Equivalent Connection Parameter
- Description
- SSL_SERVER_CERT_DN
sslServerCertDN <getconnectiondbattrssslcert>
The distinguished name (DN) that should be matched with the server.
Note: If specified, this value is used for any verification. Otherwise, the hostname will be used.
- SSL_SERVER_DN_MATCH
sslServerDNMatch <getconnectiondbattrssslmatch>
Determines whether the server certificate DN should be matched in addition to the regular certificate verification that is performed.
Note: In Thin mode, parsing the parameter supports case insensitive on/yes/true values similar to the Thick mode. Any other value is treated as disabling it.
- WALLET_LOCATION
walletLocation <getconnectiondbattrswalletloc>
The directory where the wallet can be found.
Note: Used in Easy Connect Strings. It is same as
MY_WALLET_DIRECTORY
in a connect descriptor.
- MY_WALLET_DIRECTORY
walletLocation <getconnectiondbattrswalletloc>
The directory where the wallet can be found.
Note: Used by connect descriptors in the
oracledb.getConnection()
ororacledb.createPool()
functions.
- EXPIRE_TIME
expireTime <getconnectiondbattrsexpiretime>
- The number of minutes between the sending of keepalive probes.
- HTTPS_PROXY
httpsProxy <getconnectiondbattrshttpsproxy>
- The name or IP address of a proxy host to use for tunneling secure connections.
- HTTPS_PROXY_PORT
httpsProxyPort <getconnectiondbattrshttpsproxyport>
- The port to be used to communicate with the proxy host.
- RETRY_COUNT
retryCount <getconnectiondbattrsretrycount>
- The number of times that a connection attempt should be retried before the attempt is terminated.
- RETRY_DELAY
retryDelay <getconnectiondbattrsretrydelay>
- The number of seconds to wait before making a new connection attempt.
- TRANSPORT_CONNECT_TIMEOUT
transportConnectTimeout <getconnectiondbattrstransportconntimeout>
- The maximum number of seconds to wait to establish a connection to the database host.
- POOL_CONNECTION_CLASS
cclass <oracledb.connectionClass>
- Defines a logical name for connections.
In node-oracledb Thick mode, the above values only work when connected to Oracle Database 21c or later.
The ENABLE=BROKEN
connect descriptor option is not supported in node-oracledb Thin mode. Use expireTime <getconnectiondbattrsexpiretime>
instead.
The Session Data Unit (SDU)
connect descriptor option that is used to tune network transfers is supported in node-oracledb Thin mode and has a default value of 8 KB. In node-oracledb Thick mode, the SDU connect descriptor option and equivalent sqlnet.ora
setting are used.
If a bare name is given as a connect string, then the node-oracledb Thin mode will consider it as a Net Service Name and not as the minimal Easy Connect string of a hostname. The given connect string will be looked up in a tnsnames.ora
file. This is different from the node-oracledb Thick mode. If supporting a bare name as a hostname is important to you in the node-oracledb Thin mode, then you can alter the connection string to include a port number such as hostname:1521
or a protocol such as tcp://hostname
.
For multiple hosts or IP addresses, node-oracledb connects to the host name used in the parameters of the Connection object, if available. If the Connection object does not have the parameters, then the parameters in the connect string are considered.
When using DRCP, the oracledb.connectionClass
should be set in the node-oracledb application. If not, then node-oracledb generates a unique connection class for each pool. The prefix of the generated connection class varies in the node-oracledb Thin and Thick modes. In node-oracledb Thin mode, the prefix of the generated connection class is "NJS". For node-oracledb Thick mode, the prefix is "OCI". See drcp
for more information.
When connecting with mutual TLS (mTLS) also known as two-way TLS, for example to Oracle Autonomous Database in Oracle Cloud using a wallet, the certificate must be in the correct format.
For the node-oracledb Thin mode, the certificate must be in a Privacy Enhanced Mail (PEM) ewallet.pem
file. In node-oracledb Thick mode the certificate must be in a cwallet.sso
file. See connectionadb
for more information.
The node-oracledb Thin mode does not support connections using Oracle Database native network encryption or checksumming. You can enable TLS instead of using native network encryption. If native network encryption or checksumming are required, then use node-oracledb in the Thick mode. See nne
.
Password verifiers help in authenticating the passwords of your user account when you are using username and password authentication to connect your application to Oracle Database. Password verifiers are also called password versions. The password verifier can be 10G (case-insensitive Oracle password verifier), 11G (SHA-1-based password verifier), and 12C (SHA-2-based SHA-512 password verifier).
The node-oracledb Thin mode supports password verifiers 11G and later. The node-oracledb Thick mode supports password verifiers 10G and later. To view all the password verifiers configured for the user accounts, use the following query:
SELECT USERNAME,PASSWORD_VERSIONS FROM DBA_USERS;
The PASSWORD_VERSIONS
column lists all the password verifiers that exist for the user.
If you try to connect to any supported Oracle Database with node-oracledb Thin mode, but the user account is created only with the 10G password verifier, then the connection will fail with the njs116
error.
The ~oracledb.createPool()
method in the node-oracledb Thin mode differs from the node-oracledb Thick mode in the following ways:
- Not all the parameters of the
oracledb.createPool()
method are applicable to both node-oracledb modes. Each mode ignores unrecognized parameters. The parameters that are supported in Thin mode includeaccessToken
,connectString
,connectionString
,enableStatistics
,password
,poolAlias
,poolIncrement
,poolMax
,poolMin
,poolPingInterval
,poolTimeout
,queueMax
,queueRequests
,queueTimeout
,stmtCacheSize
,user
, andusername
parameters. - The node-oracledb Thin mode only supports homogeneous pools.
The node-oracledb Thin mode creates connections in an async fashion and so
oracledb.createPool()
returns before any or all minimum number of connections are created. As soon as the pool is created, thepool.connectionsOpen
attribute will not be equal topool.poolMin
. The~pool.connectionsOpen
attribute will increase to the minimum value over a short time as the connections are established. Note that this behavior may also be true of recent versions of the Oracle Call Interface (OCI) Session Pool used in the Thick mode.This improves the application start up time when compared to the node-oracledb Thick mode, where
oracledb.createPool()
will not return control to the application until allpool.poolMin
connections have been created.If the old default Thick mode behaviour is required, then the application could check if
pool.connectionsOpen
has reachedpool.poolMin
and then continue with application start up.- In node-oracledb Thin mode, the
cclass
parameter value is not used to tag connections in the application connection pool. It is only used fordrcp
. In node-oracledb Thin mode, the connection pool supports all the
connection mode privileges <oracledbconstantsprivilege>
.The node-oracledb Thick mode does not support all the connection mode privileges.
- In node-oracledb Thick mode, the worker threads can be increased by setting the environment variable
UV_THREADPOOL_SIZE
before starting Node.js. This is not applicable to the Thin mode since it does not use threads.
In node-oracledb Thin mode, resultset.metaData
can distinguish the ROWID and UROWID database types. The UROWID database type shows the new value DB_TYPE_UROWID
and the database type ROWID uses the existing value DB_TYPE_ROWID
.
In node-oracledb Thick mode, the value DB_TYPE_ROWID
is shown for both ROWID and UROWID database types. In node-oracledb Thick and Thin modes, comparison with the type oracledb.ROWID
will match both ROWID and UROWID database types.
The node-oracledb Thin and Thick modes handle some errors differently. See errordiff
.
All Oracle NLS environment variables, and the ORA_TZFILE
environment variable, are ignored by the node-oracledb Thin mode.
The node-oracledb Thin mode can only use NCHAR, NVARCHAR2, and NCLOB data when Oracle Database's secondary character set is AL16UTF16.
See nls
.
In the node-oracledb Thin mode, low level tracing is different because there are no Oracle Client libraries. See endtoend
.
The node-oracledb Thick mode uses Oracle NLS conversion routines to convert the data found in the database to the desired data type. The node-oracledb Thin mode uses fixed JavaScript routines such as toString(). You can use a converter function to modify the behavior. See fetch type handlers
<fetchtypehandler>
.
The node-oracledb Thin and Thick modes support different Oracle Database data types. The following table lists the types that are supported in the node-oracledb driver. See Oracle Database Types <https://docs.oracle. com/en/database/oracle/oracle-database/21/sqlrf/Data-Types.html#GUID-A3C0D836- BADB-44E5-A5D4-265BA5968483>__ and PL/SQL Types <https://docs.oracle.com/en /database/oracle/oracle-database/21/lnpls/plsql-data-types.html#GUID-391C58FD- 16AF-486C-AF28-173E309CDBA5>__. The node-oracledb database type shown is the common one. In some node-oracledb APIs you may use other types, for example when binding numeric values.
Oracle Database Data Types Supported
- Oracle Database Type
- node-oracledb Database Type
- Supported in node-oracledb
- CHAR
- DB_TYPE_CHAR
- Yes
- NCHAR
- DB_TYPE_NCHAR
- Yes
- VARCHAR2
- DB_TYPE_VARCHAR
- Yes
- NVARCHAR2
- DB_TYPE_NVARCHAR
- Yes
- NUMBER, FLOAT
- DB_TYPE_NUMBER
- Yes
- BINARY_FLOAT
- DB_TYPE_BINARY_FLOAT
- Yes
- BINARY_DOUBLE
- DB_TYPE_BINARY_DOUBLE
- Yes
- LONG
- DB_TYPE_LONG
- Yes
- DATE
- DB_TYPE_DATE
- Yes
- TIMESTAMP
- DB_TYPE_TIMESTAMP
- Yes
- TIMESTAMP WITH TIME ZONE
- DB_TYPE_TIMESTAMP_TZ
- Yes
- TIMESTAMP WITH LOCAL TIME ZONE
- DB_TYPE_TIMESTAMP_LTZ
- Yes
- INTERVAL YEAR TO MONTH
- Not supported
- No
- INTERVAL DAY TO SECOND
- Not supported
- No
- RAW
- DB_TYPE_RAW
- Yes
- LONG RAW
- DB_TYPE_LONG_RAW
- Yes
- BFILE
- DB_TYPE_BFILE
- No
- BLOB
- DB_TYPE_BLOB
- Yes
- CLOB
- DB_TYPE_CLOB
- Yes
- NCLOB
- DB_TYPE_NCLOB
- Yes
- JSON
- DB_TYPE_JSON
- Yes
- ROWID
- DB_TYPE_ROWID
- Yes
- UROWID
- DB_TYPE_ROWID, DB_TYPE_UROWID
- Yes. May show DB_TYPE_UROWID in metadata. See
Query Metadata Differences <querymetadatadiff>
.
- BOOLEAN (PL/SQL and SQL)
- DB_TYPE_BOOLEAN
- Yes
- PLS_INTEGER (PL/SQL)
- DB_TYPE_BINARY_INTEGER
- Yes
- BINARY_INTEGER (PL/SQL)
- DB_TYPE_BINARY_INTEGER
- Yes
- REF CURSOR (PL/SQL or nested cursor)
- DB_TYPE_CURSOR
- Yes
- REF
- DB_TYPE_OBJECT
- No
- User-defined types (object type, VARRAY, records, collections, SDO* types)
- DB_TYPE_OBJECT
- Thick mode only
- ANYTYPE
- DB_TYPE_OBJECT
- Thick mode only
- ANYDATA
- DB_TYPE_OBJECT
- Thick mode only
- ANYDATASET
- DB_TYPE_OBJECT
- Thick mode only
- XMLType
- DB_TYPE_XMLTYPE
- Yes
To know whether the driver is in Thin or Thick Mode, you can use oracledb.thin
. The boolean attributes connection.thin
and pool.thin
can be used to show the current mode of a node-oracledb connection or pool, respectively.
Another method that can be used to check which mode is in use is to query V$SESSION_CONNECT_INFO
. See vsessconinfo
.
The features of node-oracledb Thin mode cover the needs of common frameworks that depend upon the Node.js API. For example, the node-oracledb Thin mode can be used in Sequelize. To run the node-oracledb Thin mode through Sequelize, you must not set the libPath
in the dialectOptions object and must not ~oracledb.initOracleClient
. For node-oracledb Thick mode, set the libPath
in the dialectOptions object or call ~oracledb.initOracleClient()
.