typeorm-doc.exceptionfound.com Open in urlscan Pro
68.66.224.28  Public Scan

URL: http://typeorm-doc.exceptionfound.com/interfaces/sqlserverconnectionoptions.html
Submission: On December 23 via manual from BO — Scanned from DE

Form analysis 0 forms found in the DOM

Text Content

Search
 * Preparing search index...
 * The search index is not available

typeorm
Options
All
 * Public
 * Public/Protected
 * All

Inherited Externals Only exported
Menu
 * Globals
 * SqlServerConnectionOptions


INTERFACE SQLSERVERCONNECTIONOPTIONS

Microsoft Sql Server specific connection options.


HIERARCHY

 * BaseConnectionOptions
 * SqlServerConnectionCredentialsOptions
   * SqlServerConnectionOptions


INDEX


PROPERTIES

 * cache
 * cli
 * connectionTimeout
 * database
 * domain
 * dropSchema
 * entities
 * entityPrefix
 * extra
 * host
 * logger
 * logging
 * maxQueryExecutionTime
 * migrations
 * migrationsRun
 * migrationsTableName
 * name
 * namingStrategy
 * options
 * password
 * pool
 * port
 * replication
 * requestTimeout
 * schema
 * stream
 * subscribers
 * synchronize
 * type
 * url
 * username


PROPERTIES


OPTIONAL CACHE

cache: boolean | object

Inherited from BaseConnectionOptions.cache

 * Defined in connection/BaseConnectionOptions.ts:109

Allows to setup cache options.


OPTIONAL CLI

cli: object

Inherited from BaseConnectionOptions.cli

 * Defined in connection/BaseConnectionOptions.ts:147

CLI settings.

TYPE DECLARATION

 * OPTIONAL ENTITIESDIR?: STRING
   
   Directory where entities should be created by default.

 * OPTIONAL MIGRATIONSDIR?: STRING
   
   Directory where migrations should be created by default.

 * OPTIONAL SUBSCRIBERSDIR?: STRING
   
   Directory where subscribers should be created by default.


OPTIONAL CONNECTIONTIMEOUT

connectionTimeout: number
 * Defined in driver/sqlserver/SqlServerConnectionOptions.ts:17

Connection timeout in ms (default: 15000).


OPTIONAL DATABASE

database: string

Inherited from SqlServerConnectionCredentialsOptions.database

 * Defined in driver/sqlserver/SqlServerConnectionCredentialsOptions.ts:34

Database name to connect to.


OPTIONAL DOMAIN

domain: string

Inherited from SqlServerConnectionCredentialsOptions.domain

 * Defined in driver/sqlserver/SqlServerConnectionCredentialsOptions.ts:39

Once you set domain, driver will connect to SQL Server using domain login.


OPTIONAL DROPSCHEMA

dropSchema: boolean

Inherited from BaseConnectionOptions.dropSchema

 * Defined in connection/BaseConnectionOptions.ts:92

Drops the schema each time connection is being established. Be careful with this
option and don't use this in production - otherwise you'll lose all production
data. This option is useful during debug and development.


OPTIONAL ENTITIES

entities: (string | Function | EntitySchema<any>)[]

Inherited from BaseConnectionOptions.entities

 * Defined in connection/BaseConnectionOptions.ts:28

Entities to be loaded for this connection. Accepts both entity classes and
directories where from entities need to be loaded. Directories support glob
patterns.


OPTIONAL ENTITYPREFIX

entityPrefix: string

Inherited from BaseConnectionOptions.entityPrefix

 * Defined in connection/BaseConnectionOptions.ts:97

Prefix to use on all tables (collections) of this connection in the database.


OPTIONAL EXTRA

extra: any

Inherited from BaseConnectionOptions.extra

 * Defined in connection/BaseConnectionOptions.ts:104

Extra connection options to be passed to the underlying driver.

todo: deprecate this and move all database-specific types into hts own
connection options object.


OPTIONAL HOST

host: string

Inherited from SqlServerConnectionCredentialsOptions.host

 * Defined in driver/sqlserver/SqlServerConnectionCredentialsOptions.ts:14

Database host.


OPTIONAL LOGGER

logger: "advanced-console" | "simple-console" | "file" | "debug" | Logger

Inherited from BaseConnectionOptions.logger

 * Defined in connection/BaseConnectionOptions.ts:63

Logger instance used to log queries and events in the ORM.


OPTIONAL LOGGING

logging: LoggerOptions

Inherited from BaseConnectionOptions.logging

 * Defined in connection/BaseConnectionOptions.ts:58

Logging options.


OPTIONAL MAXQUERYEXECUTIONTIME

maxQueryExecutionTime: number

Inherited from BaseConnectionOptions.maxQueryExecutionTime

 * Defined in connection/BaseConnectionOptions.ts:68

Maximum number of milliseconds query should be executed before logger log a
warning.


OPTIONAL MIGRATIONS

migrations: (string | Function)[]

Inherited from BaseConnectionOptions.migrations

 * Defined in connection/BaseConnectionOptions.ts:42

Migrations to be loaded for this connection. Accepts both migration classes and
directories where from migrations need to be loaded. Directories support glob
patterns.


OPTIONAL MIGRATIONSRUN

migrationsRun: boolean

Inherited from BaseConnectionOptions.migrationsRun

 * Defined in connection/BaseConnectionOptions.ts:85

Indicates if migrations should be auto run on every application launch.
Alternative to it, you can use CLI and run migrations:run command.


OPTIONAL MIGRATIONSTABLENAME

migrationsTableName: string

Inherited from BaseConnectionOptions.migrationsTableName

 * Defined in connection/BaseConnectionOptions.ts:48

Migrations table name, in case of different name from "migrations". Accepts
single string name.


OPTIONAL NAME

name: string

Inherited from BaseConnectionOptions.name

 * Defined in connection/BaseConnectionOptions.ts:21

Connection name. If connection name is not given then it will be called
"default". Different connections must have different names.


OPTIONAL NAMINGSTRATEGY

namingStrategy: NamingStrategyInterface

Inherited from BaseConnectionOptions.namingStrategy

 * Defined in connection/BaseConnectionOptions.ts:53

Naming strategy to be used to name tables and columns in the database.


OPTIONAL OPTIONS

options: object
 * Defined in driver/sqlserver/SqlServerConnectionOptions.ts:114

Extra options

TYPE DECLARATION

 * OPTIONAL ABORTTRANSACTIONONERROR?: BOOLEAN
   
   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_ABORT during the initial SQL phase of a connection
   (documentation).

 * OPTIONAL CAMELCASECOLUMNS?: BOOLEAN
   
   A 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).

 * OPTIONAL CANCELTIMEOUT?: NUMBER
   
   The number of milliseconds before the cancel (abort) of a request is
   considered failed (default: 5000).

 * OPTIONAL CONNECTTIMEOUT?: NUMBER
   
   The number of milliseconds before the attempt to connect is considered failed
   (default: 15000).

 * OPTIONAL CONNECTIONISOLATIONLEVEL?: "READ_UNCOMMITTED" | "READ_COMMITTED" |
   "REPEATABLE_READ" | "SERIALIZABLE" | "SNAPSHOT"
   
   The 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 .

 * OPTIONAL CRYPTOCREDENTIALSDETAILS?: ANY
   
   When encryption is used, an object may be supplied that will be used for the
   first argument when calling tls.createSecurePair (default: {}).

 * OPTIONAL DEBUG?: OBJECT
   
   Debug options
   
   * OPTIONAL DATA?: BOOLEAN
     
     A boolean, controlling whether debug events will be emitted with text
     describing packet data details (default: false).
   
   * OPTIONAL PACKET?: BOOLEAN
     
     A boolean, controlling whether debug events will be emitted with text
     describing packet details (default: false).
   
   * OPTIONAL PAYLOAD?: BOOLEAN
     
     A boolean, controlling whether debug events will be emitted with text
     describing packet payload details (default: false).
   
   * OPTIONAL TOKEN?: BOOLEAN
     
     A boolean, controlling whether debug events will be emitted with text
     describing token stream tokens (default: false).

 * OPTIONAL DISABLEOUTPUTRETURNING?: BOOLEAN
   
   A boolean, controlling whatever to disable RETURNING / OUTPUT statements.

 * OPTIONAL ENABLEANSINULLDEFAULT?: BOOLEAN
   
   If 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 for more
   details. (Default: true).

 * OPTIONAL ENCRYPT?: BOOLEAN
   
   A boolean determining whether or not the connection will be encrypted. Set to
   true if you're on Windows Azure. (default: false).

 * OPTIONAL FALLBACKTODEFAULTDB?: BOOLEAN
   
   By default, if the database requestion by options.database cannot be
   accessed, the connection will fail with an error. However, if
   options.fallbackToDefaultDb is set to true, then the user's default database
   will be used instead (Default: false).

 * OPTIONAL ISOLATION?: "READ_UNCOMMITTED" | "READ_COMMITTED" |
   "REPEATABLE_READ" | "SERIALIZABLE" | "SNAPSHOT"
   
   The default isolation level that transactions will be run with. The isolation
   levels are available from require('tedious').ISOLATION_LEVEL. (default:
   READ_COMMITTED).

 * OPTIONAL LOCALADDRESS?: STRING
   
   A string indicating which network interface (ip address) to use when
   connecting to SQL Server.

 * OPTIONAL PACKETSIZE?: NUMBER
   
   The size of TDS packets (subject to negotiation with the server). Should be a
   power of 2. (default: 4096).

 * OPTIONAL READONLYINTENT?: BOOLEAN
   
   A boolean, determining whether the connection will request read only access
   from a SQL Server Availability Group. For more information, see here.
   (default: false).

 * OPTIONAL ROWCOLLECTIONONDONE?: BOOLEAN
   
   A boolean, that when true will expose received rows in Requests' done*
   events. See done, doneInProc and doneProc. (default: false) Caution: If many
   row are received, enabling this option could result in excessive memory
   usage.

 * OPTIONAL ROWCOLLECTIONONREQUESTCOMPLETION?: BOOLEAN
   
   A boolean, that when true will expose received rows in Requests' completion
   callback. See new Request. (default: false) Caution: If many row are
   received, enabling this option could result in excessive memory usage.

 * OPTIONAL TDSVERSION?: STRING
   
   The 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. (default: 7_4).

 * OPTIONAL USECOLUMNNAMES?: BOOLEAN
   
   A boolean determining whether to return rows as arrays or key-value
   collections. (default: false).

 * OPTIONAL USEUTC?: BOOLEAN
   
   A boolean determining whether to pass time values in UTC or local time.
   (default: true).


OPTIONAL PASSWORD

password: string

Inherited from SqlServerConnectionCredentialsOptions.password

 * Defined in driver/sqlserver/SqlServerConnectionCredentialsOptions.ts:29

Database password.


OPTIONAL POOL

pool: object
 * Defined in driver/sqlserver/SqlServerConnectionOptions.ts:39

An optional object/dictionary with the any of the properties

TYPE DECLARATION

 * OPTIONAL ACQUIRETIMEOUTMILLIS?: NUMBER
   
   Max milliseconds an acquire call will wait for a resource before timing out.
   (default no limit), if supplied should non-zero positive integer.

 * OPTIONAL AUTOSTART?: NUMBER
   
   Should the pool start creating resources etc once the constructor is called,
   (default true)

 * OPTIONAL EVICTIONRUNINTERVALMILLIS?: NUMBER
   
   How often to run eviction checks. Default: 0 (does not run).

 * OPTIONAL FIFO?: BOOLEAN
   
   If true the oldest resources will be first to be allocated. If false the most
   recently released resources will be the first to be allocated. This in effect
   turns the pool's behaviour from a queue into a stack. boolean, (default true)

 * OPTIONAL IDLETIMEOUTMILLIS?: NUMBER
   
   The minimum amount of time that an object may sit idle in the pool before it
   is eligible for eviction due to idle time. Supercedes softIdleTimeoutMillis
   Default: 30000

 * OPTIONAL MAX?: NUMBER
   
   Maximum number of resources to create at any given time. (default=1)

 * OPTIONAL MAXWAITINGCLIENTS?: NUMBER
   
   Maximum number of queued requests allowed, additional acquire calls will be
   callback with an err in a future cycle of the event loop.

 * OPTIONAL MIN?: NUMBER
   
   Minimum number of resources to keep in pool at any given time. If this is set
   >= max, the pool will silently set the min to equal max. (default=0)

 * OPTIONAL NUMTESTSPERRUN?: NUMBER
   
   Number of resources to check each eviction run. Default: 3.

 * OPTIONAL PRIORITYRANGE?: NUMBER
   
   Int between 1 and x - if set, borrowers can specify their relative priority
   in the queue if no resources are available. see example. (default 1)

 * OPTIONAL SOFTIDLETIMEOUTMILLIS?: NUMBER
   
   Amount of time an object may sit idle in the pool before it is eligible for
   eviction by the idle object evictor (if any), with the extra condition that
   at least "min idle" object instances remain in the pool. Default -1 (nothing
   can get evicted)

 * OPTIONAL TESTONBORROW?: BOOLEAN
   
   Should the pool validate resources before giving them to clients. Requires
   that either factory.validate or factory.validateAsync to be specified


OPTIONAL PORT

port: number

Inherited from SqlServerConnectionCredentialsOptions.port

 * Defined in driver/sqlserver/SqlServerConnectionCredentialsOptions.ts:19

Database host port.


OPTIONAL REPLICATION

replication: object
 * Defined in driver/sqlserver/SqlServerConnectionOptions.ts:260

Replication setup.

TYPE DECLARATION

 * MASTER: SQLSERVERCONNECTIONCREDENTIALSOPTIONS
   
   Master server used by orm to perform writes.

 * SLAVES: SQLSERVERCONNECTIONCREDENTIALSOPTIONS[]
   
   List of read-from severs (slaves).


OPTIONAL REQUESTTIMEOUT

requestTimeout: number
 * Defined in driver/sqlserver/SqlServerConnectionOptions.ts:22

Request timeout in ms (default: 15000). NOTE: msnodesqlv8 driver doesn't support
timeouts < 1 second.


OPTIONAL SCHEMA

schema: string
 * Defined in driver/sqlserver/SqlServerConnectionOptions.ts:34

Database schema.


OPTIONAL STREAM

stream: boolean
 * Defined in driver/sqlserver/SqlServerConnectionOptions.ts:29

Stream recordsets/rows instead of returning them all at once as an argument of
callback (default: false). You can also enable streaming for each request
independently (request.stream = true). Always set to true if you plan to work
with large amount of rows.


OPTIONAL SUBSCRIBERS

subscribers: (string | Function)[]

Inherited from BaseConnectionOptions.subscribers

 * Defined in connection/BaseConnectionOptions.ts:35

Subscribers to be loaded for this connection. Accepts both subscriber classes
and directories where from subscribers need to be loaded. Directories support
glob patterns.


OPTIONAL SYNCHRONIZE

synchronize: boolean

Inherited from BaseConnectionOptions.synchronize

 * Defined in connection/BaseConnectionOptions.ts:79

Indicates if database schema should be auto created on every application launch.
Be careful with this option and don't use this in production - otherwise you can
lose production data. This option is useful during debug and development.
Alternative to it, you can use CLI and run schema:sync command.

Note that for MongoDB database it does not create schema, because MongoDB is
schemaless. Instead, it syncs just by creating indices.


TYPE

type: "mssql"

Overrides BaseConnectionOptions.type

 * Defined in driver/sqlserver/SqlServerConnectionOptions.ts:12

Database type.


OPTIONAL URL

url: string

Inherited from SqlServerConnectionCredentialsOptions.url

 * Defined in driver/sqlserver/SqlServerConnectionCredentialsOptions.ts:9

Connection url where perform connection to.


OPTIONAL USERNAME

username: string

Inherited from SqlServerConnectionCredentialsOptions.username

 * Defined in driver/sqlserver/SqlServerConnectionCredentialsOptions.ts:24

Database username.

 * Globals

 * SqlServerConnectionOptions
   * cache
   * cli
   * connectionTimeout
   * database
   * domain
   * dropSchema
   * entities
   * entityPrefix
   * extra
   * host
   * logger
   * logging
   * maxQueryExecutionTime
   * migrations
   * migrationsRun
   * migrationsTableName
   * name
   * namingStrategy
   * options
   * password
   * pool
   * port
   * replication
   * requestTimeout
   * schema
   * stream
   * subscribers
   * synchronize
   * type
   * url
   * username


LEGEND

 * Module
 * Object literal
 * Variable
 * Function
 * Function with type parameter
 * Index signature
 * Type alias

 * Enumeration
 * Enumeration member
 * Property
 * Method

 * Interface
 * Interface with type parameter
 * Constructor
 * Property
 * Method
 * Index signature

 * Class
 * Class with type parameter
 * Constructor
 * Property
 * Method
 * Accessor
 * Index signature

 * Inherited constructor
 * Inherited property
 * Inherited method
 * Inherited accessor

 * Protected property
 * Protected method
 * Protected accessor

 * Private property
 * Private method
 * Private accessor

 * Static property
 * Static method

Generated using TypeDoc