Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

MssqlDialect

MS SQL Server dialect that uses the tedious library.

The constructor takes an instance of MssqlDialectConfig.

import * as Tedious from 'tedious'
import * as Tarn from 'tarn'

const dialect = new MssqlDialect({
  tarn: {
    ...Tarn,
    options: {
      min: 0,
      max: 10,
    },
  },
  tedious: {
    ...Tedious,
    connectionFactory: () => new Tedious.Connection({
      authentication: {
        options: {
          password: 'password',
          userName: 'username',
        },
        type: 'default',
      },
      options: {
        database: 'some_db',
        port: 1433,
        trustServerCertificate: true,
      },
      server: 'localhost',
    }),
  },
})
class MssqlDialect implements Dialect {
constructor(config: MssqlDialectConfig);
createAdapter(): DialectAdapter;
createDriver(): Driver;
createIntrospector(db: Kysely<any>): DatabaseIntrospector;
createQueryCompiler(): QueryCompiler;
}

§Implements

§Constructors

§
new MssqlDialect(config: MssqlDialectConfig)
[src]

§Methods

§
createAdapter(): DialectAdapter
[src]

Creates an adapter for the dialect.

§
createDriver(): Driver
[src]

Creates a driver for the dialect.

§
createIntrospector(db: Kysely<any>): DatabaseIntrospector
[src]

Creates a database introspector that can be used to get database metadata such as the table names and column names of those tables.

db never has any plugins installed. It's created using Kysely.withoutPlugins.

§
createQueryCompiler(): QueryCompiler
[src]

Creates a query compiler for the dialect.