Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface QueryOptions

Hierarchy

Index

Properties

arrayParenthesis?: boolean

Indicate if array are included in parenthesis. This option permit compatibility with version < 2.5

autoJsonMap?: boolean

indicate if JSON fields for MariaDB server 10.5.2+ results in JSON format (or String if disabled)

bigIntAsNumber?: boolean

Force returning BIGINT data as Number in place of BigInt.

Default: false;

bulk?: boolean

disabled bulk command in batch.

checkDuplicate?: boolean

indicate to throw an exception if result-set will not contain some data due to having duplicate identifier (Default: true)

dateStrings?: boolean

Whether to retrieve dates as strings or as Date objects.

decimalAsNumber?: boolean

force returning decimal values as Number in place of String

Default: false;

forceVersionCheck?: boolean

Force server version check by explicitly using SELECT VERSION(), not relying on server initial handshake information

insertIdAsNumber?: boolean

force returning insertId as Number in place of BigInt

isPool?: boolean
logger?: LoggerConfig

Configure logger

namedPlaceholders?: boolean

Allows the use of named placeholders.

nestTables?: string | boolean

Presents result-sets by table to avoid results with colliding fields. See the query() description for more information.

permitLocalInfile?: boolean

Allows the use of LOAD DATA INFILE statements. Loading data from a file from the client may be a security issue, as a man-in-the-middle proxy server can change the actual file the server loads. Being able to execute a query on the client gives you access to files on the client. (Default: false)

permitSetMultiParamEntries?: boolean

Compatibility option to permit setting multiple value by a JSON object to replace one question mark. key values will replace the question mark with format like key1=val,key2='val2'. Since it doesn't respect the usual prepared statement format that one value is for one question mark, this can lead to incomprehension, even if badly use to possible injection.

pipelining?: boolean

Sends queries one by one without waiting on the results of the previous entry. (Default: true)

rowsAsArray?: boolean

Return result-sets as array, rather than a JSON object. This is a faster way to get results

sql: string

SQL command to execute

timeout?: number

Allows timeout for command execution.

timezone?: string

Forces use of the indicated timezone, rather than the current Node.js timezone. Possible values are Z for UTC, local or ±HH:MM format

typeCast?: TypeCastFunction

Allows to cast result types.

Generated using TypeDoc