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({ ... }),
},
})
This dialect uses the
tarnpackage 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 thetarnpackage itself. You also need to pass some pool options (excludingcreate,destroyandvalidatefunctions which are controlled by this dialect),min&maxconnections at the very least.Example: