OptionalabortOptionalappApplication name used for identifying a specific application in profiling, logging or tracing tools of SQLServer.
(default: Tedious)
OptionalcamelA boolean, controlling whether the column names returned will have the first letter converted to lower case
(true) or not. This value is ignored if you provide a columnNameReplacer.
(default: false).
OptionalcancelThe number of milliseconds before the Request.cancel (abort) of a request is considered failed
(default: 5000).
OptionalcolumnA function with parameters (columnName, index, columnMetaData) and returning a string. If provided,
this will be called once per column per result-set. The returned value will be used instead of the SQL-provided
column name on row and meta data objects. This allows you to dynamically convert between naming conventions.
(default: null)
OptionalconnectionThe default isolation level for new connections. All out-of-transaction queries are executed with this setting.
The isolation levels are available from require('tedious').ISOLATION_LEVEL.
READ_UNCOMMITTEDREAD_COMMITTEDREPEATABLE_READSERIALIZABLESNAPSHOT(default: READ_COMMITTED).
OptionalconnectionNumber of milliseconds before retrying to establish connection, in case of transient failure.
(default:500)
OptionalconnectorCustom connector factory method.
(default: undefined)
OptionalconnectThe number of milliseconds before the attempt to connect is considered failed
(default: 15000).
OptionalcryptoWhen encryption is used, an object may be supplied that will be used
for the first argument when calling tls.createSecureContext.
(default: {})
OptionaldatabaseDatabase to connect to (default: dependent on server configuration).
OptionaldatefirstSets the first day of the week to a number from 1 through 7.
OptionaldateA string representing position of month, day and year in temporal datatypes.
(default: mdy)
OptionaldebugOptionalenableA boolean, controls the way null values should be used during comparison operation.
(default: true)
OptionalenableIf true, SET ANSI_NULL_DFLT_ON ON will be set in the initial sql. This means new columns will be
nullable by default. See the T-SQL documentation
(default: true).
OptionalenableA boolean, controls if padding should be applied for values shorter than the size of defined column.
(default: true)
OptionalenableIf true, SQL Server will follow ISO standard behavior during various error conditions. For details, see documentation
(default: true)
OptionalenableEnds a query when an overflow or divide-by-zero error occurs during query execution. See documentation for more details.
(default: true)
OptionalenableA boolean, determines if concatenation with NULL should result in NULL or empty string value, more details in documentation
(default: true)
OptionalenableA boolean, controls whether cursor should be closed, if the transaction opening it gets committed or rolled back.
(default: null)
OptionalenableA boolean, sets the connection to either implicit or autocommit transaction mode.
(default: false)
OptionalenableIf false, error is not generated during loss of precision.
(default: false)
OptionalenableIf true, characters enclosed in single quotes are treated as literals and those enclosed double quotes are treated as identifiers.
(default: true)
OptionalencryptA string value that can be only set to 'strict', which indicates the usage TDS 8.0 protocol. Otherwise, a boolean determining whether or not the connection will be encrypted.
(default: true)
OptionalfallbackBy default, if the database requested by database cannot be accessed,
the connection will fail with an error. However, if fallbackToDefaultDb is
set to true, then the user's default database will be used instead
(default: false)
OptionalinstanceThe instance name to connect to. The SQL Server Browser service must be running on the database server, and UDP port 1434 on the database server must be reachable.
(no default)
Mutually exclusive with port.
OptionalisolationThe default isolation level that transactions will be run with.
The isolation levels are available from require('tedious').ISOLATION_LEVEL.
READ_UNCOMMITTEDREAD_COMMITTEDREPEATABLE_READSERIALIZABLESNAPSHOT(default: READ_COMMITTED).
OptionallanguageSpecifies the language environment for the session. The session language determines the datetime formats and system messages.
(default: us_english).
OptionallocalA string indicating which network interface (ip address) to use when connecting to SQL Server.
OptionallowerA boolean determining whether to parse unique identifier type with lowercase case characters.
(default: false).
OptionalmaxThe maximum number of connection retries for transient errors.
(default: 3).
OptionalmultiSets the MultiSubnetFailover = True parameter, which can help minimize the client recovery latency when failovers occur.
(default: false).
OptionalpacketThe size of TDS packets (subject to negotiation with the server). Should be a power of 2.
(default: 4096).
OptionalportPort to connect to (default: 1433).
Mutually exclusive with instanceName
OptionalreadA boolean, determining whether the connection will request read only access from a SQL Server Availability Group. For more information, see here
(default: false).
OptionalrequestThe number of milliseconds before a request is considered failed, or 0 for no timeout.
As soon as a response is received, the timeout is cleared. This means that queries that immediately return a response have ability to run longer than this timeout.
(default: 15000).
OptionalrowA boolean, that when true will expose received rows in Requests done related events:
(default: false)
Caution: If many row are received, enabling this option could result in excessive memory usage.
OptionalrowA boolean, that when true will expose received rows in Requests' completion callback.See Request.constructor.
(default: false)
Caution: If many row are received, enabling this option could result in excessive memory usage.
OptionalserverOptionaltdsThe version of TDS to use. If server doesn't support specified version, negotiated version is used instead.
The versions are available from require('tedious').TDS_VERSION.
7_1 (deprecated, support will be removed in a future version)7_27_3_A7_3_B7_4(default: 7_4)
OptionaltextsizeSpecifies the size of varchar(max), nvarchar(max), varbinary(max), text, ntext, and image data returned by a SELECT statement.
(default: 2147483647)
OptionaltrustIf "true", the SQL Server SSL certificate is automatically trusted when the communication layer is encrypted using SSL.
If "false", the SQL Server validates the server SSL certificate. If the server certificate validation fails, the driver raises an error and terminates the connection. Make sure the value passed to serverName exactly matches the Common Name (CN) or DNS name in the Subject Alternate Name in the server certificate for an SSL connection to succeed.
(default: false)
OptionaluseA boolean determining whether to return rows as arrays or key-value collections.
(default: false).
OptionaluseA boolean determining whether to pass time values in UTC or local time.
(default: true).
OptionalworkstationThe workstation ID (WSID) of the client, default os.hostname(). Used for identifying a specific client in profiling, logging or tracing client activity in SQLServer.
The value is reported by the TSQL function HOST_NAME().
A boolean determining whether to rollback a transaction automatically if any error is encountered during the given transaction's execution. This sets the value for
SET XACT_ABORTduring the initial SQL phase of a connection documentation.