Options
All
  • Public
  • Public/Protected
  • All
Menu

Microsoft Sql Server specific connection options.

Hierarchy

Index

Properties

Optional cache

cache: boolean | object

Allows to setup cache options.

Optional cli

cli: undefined | object

CLI settings.

Optional connectionTimeout

connectionTimeout: undefined | number

Connection timeout in ms (default: 15000).

Optional database

database: undefined | string

Database name to connect to.

Optional domain

domain: undefined | string

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

Optional dropSchema

dropSchema: undefined | true | false

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>)[]

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: undefined | string

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

Optional extra

extra: any

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: undefined | string

Database host.

Optional logger

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

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

Optional logging

logging: LoggerOptions

Logging options.

Optional maxQueryExecutionTime

maxQueryExecutionTime: undefined | number

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

Optional migrations

migrations: (string | Function)[]

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: undefined | true | false

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: undefined | string

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

Optional name

name: undefined | string

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

Optional namingStrategy

namingStrategy: NamingStrategyInterface

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

Optional options

options: undefined | object

Extra options

Optional password

password: undefined | string

Database password.

Optional pool

pool: undefined | object

An optional object/dictionary with the any of the properties

Optional port

port: undefined | number

Database host port.

Optional replication

replication: undefined | object

Replication setup.

Optional requestTimeout

requestTimeout: undefined | number

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

Optional schema

schema: undefined | string

Database schema.

Optional stream

stream: undefined | true | false

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)[]

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: undefined | true | false

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"

Database type.

Optional url

url: undefined | string

Connection url where perform connection to.

Optional username

username: undefined | string

Database username.

Generated using TypeDoc