Skip to content

Latest commit

 

History

History
799 lines (702 loc) · 29.2 KB

appendix_a.rst

File metadata and controls

799 lines (702 loc) · 29.2 KB

Appendix A: The node-oracledb Thin and Thick Modes

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.

Oracle Database Features Supported by node-oracledb

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
    • Connection pooling - Heterogeneous and Homogeneous (see Connection pooling <connpooling>)
    • Homogeneous only
    • Yes
    • Connection pool draining (see Connection draining <conpooldraining>)
    • Yes
    • Yes
    • Connection pool session state callback (sessionfixupnode)
    • Yes - JavaScript functions but not PL/SQL functions
    • Yes
    • Connection pool session tagging (see connpooltagging)
    • No
    • Yes
    • Proxy connections (see proxyauth)
    • Yes
    • Yes
    • Set the current schema using an attribute
    • Yes
    • Yes
    • External authentication (see extauth)
    • No
    • Yes
    • Connection mode privileges (see oracledbconstantsprivilege)
    • Yes
    • Yes
    • Preliminary connections
    • No
    • Yes
    • Real Application Clusters (RAC) (see connectionrac)
    • Yes
    • Yes
    • Oracle Sharded Databases (see sharding)
    • No
    • Yes - No TIMESTAMP support
    • Connection Pool Connection Load Balancing (CLB)
    • Yes
    • Yes
    • Connection Pool Runtime Load Balancing (RLB) (see connectionrlb)
    • No
    • Yes
    • Oracle Cloud Infrastructure (OCI) Identity and Access Management (IAM) Tokens (see iamtokenbasedauthentication)
    • Yes
    • Yes - In connection string with appropriate Oracle Client
    • Open Authorization (OAuth 2.0) (see oauthtokenbasedauthentication)
    • Yes
    • Yes
    • Kerberos, Radius, and Public Key Infrastructure (PKI) authentication services
    • No
    • Yes
    • Oracle Database Native Network Encryption and Checksumming (see nne)
    • No
    • Yes
    • Connection pinging API (see connection.ping())
    • Yes
    • Yes
    • Oracle Net Services tnsnames.ora file (see tnsadmin)
    • Yes
    • Yes
    • Oracle Net Services sqlnet.ora file (see tnsadmin)
    • No - A few values can be set in Easy Connect string
    • Yes
    • Oracle Client library configuration file oraaccess.xml (see oraaccess)
    • No
    • Yes
    • Easy Connect connection strings (see easyconnect)
    • Yes - Unknown settings are ignored and not passed to Oracle Database
    • Yes
    • Oracle Cloud Database connectivity (see connectionadb)
    • Yes
    • Yes
    • One-way TLS connections (see connectionadbtls)
    • Yes
    • Yes
    • Mutual TLS (mTLS) connections (see connectionadbmtls)
    • Yes - Needs a PEM format wallet
    • Yes
    • Oracle Database Dedicated Servers, Shared Servers, and Database Resident Connection Pooling (DRCP) (see drcp)
    • Yes
    • Yes
    • Oracle Database 23ai Implicit connection pooling for DRCP and PRCP (see implicitpool)
    • Yes
    • Yes
    • Multitenant Databases
    • Yes
    • Yes
    • CMAN and CMAN-TDM connectivity
    • Yes
    • Yes
    • Bequeath connections
    • No
    • Yes
    • Password changing (see connection.changePassword())
    • Yes
    • Yes
    • Statement break/reset (see connection.break())
    • Yes - Out-of-Band (OOB) Connection Breaks not supported
    • Yes
    • Edition Based Redefinition (EBR) (see ebr)
    • No
    • Yes
    • SQL execution (see sqlexecution)
    • Yes - Bind and fetch all types except BFILE
    • Yes
    • PL/SQL execution (see plsqlexecution)
    • Yes - For scalar types and collection types using array interface
    • Yes
    • Bind variables for data binding (see bind)
    • Yes
    • Yes
    • Array DML binding for bulk DML and PL/SQL (also called executeMany()) (see batchexecution)
    • Yes
    • Yes
    • SQL and PL/SQL type and collections (see fetchobjects)
    • Yes
    • Yes
    • Query column metadata (see querymeta)
    • Yes
    • Yes
    • Client character set support (see charset)
    • UTF-8
    • UTF-8
    • 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
    • Statement caching (see stmtcache)
    • Yes
    • Yes
    • Row prefetching on first query execute (see oracledb.prefetchRows)
    • Yes
    • Yes
    • Array fetching for queries (see oracledb.fetchArraySize)
    • Yes
    • Yes
    • Client Result Caching (CRC) (see clientresultcache)
    • No
    • Yes
    • In-band notifications
    • Yes
    • Yes
    • Continuous Query Notification (CQN) (see cqn)
    • No
    • Yes
    • Advanced Queuing (AQ) (see aq)
    • No
    • Yes
    • AQ: Transactional Event Queue (TxEventQ)
    • No
    • Yes
    • Call timeouts (see connection.callTimeout)
    • Yes
    • Yes
    • Oracle Database startup and shutdown (see startupshutdown)
    • No
    • Yes
    • Transaction management (see transactionmgt)
    • Yes - Property ~oracledb.autoCommit is false
    • Yes
    • Automatic Diagnostic Repository (ADR)
    • No
    • Yes
    • Events mode for notifications
    • No
    • Yes
    • Fast Application Notification (FAN) (see connectionfan)
    • No
    • Yes
    • 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
    • End-to-end monitoring and tracing attributes (see tracingsql)
    • Yes
    • Yes
    • Java Debug Wire Protocol for debugging PL/SQL (see jdwp)
    • Yes - Using the connection parameter debugJdwp or the ORA_DEBUG_JDWP environment variable
    • Yes - Using the the ORA_DEBUG_JDWP environment variable
    • Feature tracking
    • No
    • Yes
    • Two-phase Commit (TPC) (see twopc)
    • No
    • Yes
    • REF CURSORs (see refcursors)
    • Yes
    • Yes
    • Nested Cursors (see nestedcursors)
    • Yes
    • Yes
    • Pipelined table functions (see pipelined table functions <pipelinedfunction>)
    • Yes
    • Yes
    • Implicit Result Sets (see implicitresults)
    • Yes
    • Yes
    • 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
    • INTERVAL DAY TO SECOND data type (see oracledbconstantsdbtype)
    • No
    • No
    • INTERVAL YEAR TO MONTH data type (see oracledbconstantsdbtype)
    • No
    • No
    • Simple Oracle Document Access (SODA) (see SODA <sodaoverview>)
    • No
    • Yes
    • Oracle Database 12c JSON (as BLOB) (see json12ctype)
    • Yes
    • Yes
    • Oracle Database 21c JSON data type (see json21ctype)
    • Yes
    • Yes
    • Oracle Database 23ai JSON duality view
    • Yes
    • Yes
    • Oracle Database 23ai BOOLEAN data type (see oracledbconstantsdbtype)
    • Yes
    • Yes
    • ROWID, UROWID data types (see oracledbconstantsdbtype)
    • Yes
    • Yes
    • XMLType data type (see xmltype)
    • Yes
    • Yes - May need to fetch as CLOB
    • BFILE data type
    • No
    • No
    • TIMESTAMP WITH TIME ZONE data type (see oracledbconstantsdbtype)
    • Yes
    • Yes
    • NCHAR, NVARCHAR2, NCLOB data types (see oracledbconstantsdbtype)
    • Yes
    • Yes
    • Oracle Database 23c VECTOR data type (see oracledbconstantsdbtype)
    • Yes
    • Yes
    • 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
    • Restricted Rowid
    • No
    • Yes

Differences between the node-oracledb Thin and Thick Modes

This section details the differences between the node-oracledb Thin and Thick modes. Also, see the summary feature comparison table in featuresummary.

Connection Handling Differences between Thin and Thick Modes

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.

Oracle Client Library Loading

  • 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 to Thick mode <enablingthick>. Calling the initOracleClient() method immediately loads Oracle Client libraries. Some additional functionality <featuresummary> is available when node-oracledb uses the Oracle Client libraries. See thickarch.

Unclosed Standalone Connections

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.

Connections to a Local Database

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.

Oracle Net Services and Client Configuration Files

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 the getConnection() <getconnectiondbattrsconfigdir> or createPool() <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.

  • 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.

Connection Strings

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() or oracledb.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.

Database Resident Connection Pooling (DRCP)

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.

Transport Layer Security (TLS) Support

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.

Native Network Encryption and Checksumming

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 Verifier Support

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.

Connection Pooling Differences between Thin and Thick Modes

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 include accessToken, connectString, connectionString, enableStatistics, password, poolAlias, poolIncrement, poolMax, poolMin, poolPingInterval, poolTimeout, queueMax, queueRequests, queueTimeout, stmtCacheSize, user, and username 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, the pool.connectionsOpen attribute will not be equal to pool.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 all pool.poolMin connections have been created.

    If the old default Thick mode behaviour is required, then the application could check if pool.connectionsOpen has reached pool.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 for drcp.
  • 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.

Query Metadata in Thin and Thick Modes

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.

Error Handling in Thin and Thick Modes

The node-oracledb Thin and Thick modes handle some errors differently. See errordiff.

Globalization in Thin and Thick Modes

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.

Tracing in Thin and Thick Modes

In the node-oracledb Thin mode, low level tracing is different because there are no Oracle Client libraries. See endtoend.

Data Type Conversion in Thin and Thick Modes

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>.

Supported Database Data Types in Thin and Thick Modes

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

Testing Which Mode Is in Use

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.

Frameworks, SQL Generators, and ORMs

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().