Skip to main content
Module

x/kysely_deno_postgres_dialect/mod.ts>kysely.MssqlDialectConfig

Kysely dialect for PostgreSQL using the deno-postgres client.
Latest
interface kysely.MssqlDialectConfig
Re-export
import { type kysely } from "https://deno.land/x/kysely_deno_postgres_dialect@v0.27.1/mod.ts";
const { MssqlDialectConfig } = kysely;

Properties

tarn: Tarn

This dialect uses the tarn package to manage the connection pool to your database. To use it as a peer dependency and not bundle it with Kysely's code, you need to pass the tarn package itself. You also need to pass some pool options (excluding create, destroy and validate functions which are controlled by this dialect), min & max connections at the very least.

Example:

import * as Tarn from 'tarn'

const dialect = new MssqlDialect({
  // ...
  tarn: {
    ...Tarn,
    options: {
      // ...
      min: 0,
      max: 10,
    },
  },
})
tedious: Tedious

This dialect uses the tedious package to communicate with your MS SQL Server database. To use it as a peer dependency and not bundle it with Kysely's code, you need to pass the tedious package itself. You also need to pass a factory function that creates new tedious Connection instances on demand.

Example:

import * as Tedious from 'tedious'

const dialect = new MssqlDialect({
  // ...
  tedious: {
    ...Tedious,
    connectionFactory: () => new Tedious.Connection({ ... }),
  },
})