Configuration object passed to construct NoSQLClient instance.

This configuration can be passed to NoSQLClient directly as JavaScript object or stored in a file as JSON or JavaScript object (in which case the file path is passed to the NoSQLClient constructor). Note that most of the properties are optional and applicable default values will be used in their absense.

Note that methods of NoSQLClient that perform operations on NoSQL database take opt parameter as one of the arguments. In addition to options specific to particular operation, the opt parameter may have some of the same properties present in Config and will override thier values for particular operation. Not all options can be overriden in the opt parameter. NoSQLClient method descriptions provide list of options that can override the property values in Config for particular method. Remaining properties can only be specified in Config and thus are set for the lifetime of NoSQLClient instance. Note that all parameters present in Config, with the exception of user-defined class instances, will be copied upon creation of NoSQLClient instance, so their modification will have no effect after NoSQLClient instance is created.

Note that all timeouts, durations, and other numeric options here and elsewhere are restricted to being non-negative 32 bit integers, unless specified otherwise (the exception to this is when dates are represented as absolute value of milliseconds).

Note that since currently JavaScript and Node.js do not have a way to work with arbitrary precision decimal numbers, the driver supports integration with 3rd party number libraries to use for database type Number. This allows you to use a 3rd party of your choice (e.g. decimal.js, bignumber.js, etc.) to represent arbitrary precision numbers. See DBNumberConfig for details.

Hierarchy

  • Config

Properties

adminPollDelay?: number

Delay between successive poll attempts when waiting for completion of adminDDL operation, as used by forCompletion, in milliseconds. Can be overriden by delay or delay respectively.

Default Value

1000 (1 second)

adminPollTimeout?: number

Timeout when waiting for completion of adminDDL operation, as used by forCompletion, in milliseconds. Can be overriden by timeout or timeout respectively.

Default Value

Infinity (no timeout). This is to allow for potentially long running admin DDL operations.

auth?: AuthConfig

Authorization configuration, see AuthConfig.

See

AuthConfig

compartment?: string

Cloud service only. Compartment to use for operations with this NoSQLClient instance.

If using specific user's identity, this can be specified either as compartment OCID or compartment name. If compartment name is used it can be either the name of a top-level compartment or a path to a nested compartment, e.g. compartmentA.compartmentB.compartmentC. The path should not include the root compartment name (tenant). If this property is not specified either here or for an individual operation the tenant OCID is used as the compartment id for the operation, which is the id of the root compartment for the tenancy. See Setting Up Your Tenancy for more information.

If using Instance Principal or Resource Principal, compartment OCID must be used and there is no default.

See

IAMConfig

consistency?: Consistency

Consistency used for read operations.

Default Value

EVENTUAL (eventual consistency)

dbNumber?: DBNumberConfig

Configuration to use 3rd party number/decimal library for values of datatype Number. If not specified, the driver will use Javascript number type to represent values of type Number.

See

DBNumberConfig

ddlTimeout?: number

Timeout for DDL operations, that is operations executed by tableDDL, setTableLimits or adminDDL methods, in milliseconds. Used as a default value for timeout and timeout for these methods. Note that if complete or complete is true, separate default timeouts are used for issuing the DDL operation and waiting for its completion, with values of ddlTimeout for the former and tablePollTimeout or adminPollTimeout for the latter (if not set, these poll timeouts default to Infinity).

Defaultvalue

10000 (10 seconds)

durability?: Durability

On-premises only. Durability used for write operations.

Default Value

If not set, the default server-side durability settings are used.

endpoint?: string | URL

Endpoint to use to connect to the service. See the online documentation for the complete set of available regions. For example, ndcs.uscom-east-1.oraclecloud.com or localhost:8080. Endpoint specifies the host to connect to but may optionally specify port and/or protocol. Protocol is usually not needed and is inferred from the host and port information: if no port is specified, port 443 and protocol HTTPS are assumed, if port 443 is specified, HTTPS is assumed, if port is specified and it is not 443, HTTP is assumed. If protocol is specified, it must be either HTTP or HTTPS. For example, https://nosql.us-phoenix-1.oci.oraclecloud.com or http://localhost:8080. In this case, in addition to string, the endpoint may also be specified as Node.js URL instance. If protocol is specified but not port, 443 is assumed for HTTPS and 8080 for HTTP (which is the default port for CloudSim). You may specify endpoint or region but not both.

httpOpt?: AgentOptions

Http or https options used for the driver http requests. See HttpOpt. These are options passed to constructors of Node.js HTTP.Agent or HTTPS.Agent. If not specified, default globalHTTP.Agent or HTTPS.Agent will be used instead.

See

HttpOpt

longAsBigInt?: boolean

If set to true, Database Type Long is represented as JavaScript type BigInt. This allows to represent 64-bit integers without loss of precsision, even when they are outside of range from Number.MIN_SAFE_INTEGER to Number.MAX_SAFE_INTEGER (that is, their magnitude exceeds 53 bits in size). If this option is set, the values of datatype Long returned by the service by operations such as get as well as query results will be of type bigint. For values of datatype Long passed to the service by operations such as put you may use either BigInt or number. If not specified, defaults to false, meaning that the values of datatype Long are returned as number. In this case, loss of precision is possible for values outside the safe integer range as indicated above.

Default Value

false

maxMemoryMB?: number

Maximum amount of memory in megabytes that may be used by the driver-side portion of execution of queries for operations such as duplicate elimination (which may be required if using an index on an array or a map) and sorting. Such operations may require significant amount of memory as they need to cache full result set or a large subset of it locally. If memory consumption exceeds this value, error will result.

Default Value

1024 (1 GB)

namespace?: string

On-premises only. Default namespace for operations with this NoSQLClient instance. Any non-namespace qualified table name in requests and/or SQL statements will be resolved/qualified to the specified namespace.

Note: if a namespace is specified in the table name for the request (using the namespace:table_name format), that value will override this setting.

rateLimiter?: string | boolean | RateLimiterConstructor

For Cloud Service or Cloud Simulator only. Enables rate limiting based on table limits. You may use default rate limiter provided by the driver or supply a custom rate limiter. Set this value to true to use default rate limiter (see SimpleRateLimiter). To use custom rate limiter, set this value to the constructor function of your custom RateLimiter class. Alternatively, provide a module name which exports the constructor function. If not specified or set to false, rate limiting is disabled.

See

RateLimiter

rateLimiterPercent?: number

For Cloud Service or Cloud Simulator only. When rate limiting is enabled (see rateLimiter), specifies percentage of table limits this NoSQLClient instance will use. This is useful when running multiple clients and allotting each client only a portion of the table limits. Must be > 0 and <= 100.

Default Value

100%, meaning to use full table limits.

See

RateLimiter

region?: string | Region

Cloud service only. Specify a region to use to connect to the Oracle NoSQL Database Cloud Service. This property may be specified instead of endpoint. The service endpoint will be inferred from the region. May be specified either as Region enumeration constant, e.g. AP_MUMBAI_1 or as a string (so it can be specified in config file), which must be either one of Region enumeration constant names, e.g. AP_MUMBAI_1, US_ASHBURN_1, etc. or one of region identifiers, e.g. ap-mumbai-1, us-ashburn-1, etc. You must specify either region or endpoint but not both. The only exception to this is if you set the region identifier in an OCI configuration file together with your credentials, in which case you need not specify either region or endpoint. This implies that you store your credentials and region identifier in the OCI configuration file and provide configuration in IAMConfig to access this file or use the defaults. See IAMConfig for more information. Note that setting region or endpoint takes precedence over region identifier in an OCI configuration file.

retry?: null | RetryConfig

Configuration for operation retries as specified by RetryConfig object. If not specified, default retry configuration is used, see RetryConfig. May be set to null to disable operation retries alltogether.

See

RetryConfig

securityInfoTimeout?: number

Timeout for all operations while waiting for security information to be available in the system, in milliseconds. It is different from regular operation timeout and is used while automatically retrying operations that failed with error code SECURITY_INFO_UNAVAILABLE).

Default Value

10000 (10 seconds)

serviceType?: string

Type of service the driver will be using. May be specified as either ServiceType enumeration or string. Currently supported values are CLOUD, CLOUDSIM and KVSTORE. Although this property is optional, it is recommended to specify it to avoid ambiguity. If not specified, in most cases the driver will deduce the service type from other information in Config. See ServiceType for details.

tablePollDelay?: number

Delay between successive poll attempts when polling for table state using forCompletion while waiting for completion of tableDDL operation, in milliseconds. Can be overriden by delay or delay respectively.

Default Value

1000 (1 second)

tablePollTimeout?: number

Timeout when polling for table state using forCompletion while waiting for completion of tableDDL operation, in milliseconds. Can be overriden by timeout or timeout respectively.

Default Value

Infinity (no timeout). This is to allow for potentially long running table DDL operations.

timeout?: number

Timeout in for non-DDL operations in milliseconds. Note that for operations that are automatically retried, the timeout is cumulative over all retries and not just a timeout for a single retry. This means that all retries and waiting periods between retries are counted towards the timeout.

Default Value

5000 (5 seconds)

Generated using TypeDoc