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({ ... }),
},
})
Generated using TypeDoc
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 thetarn
package itself. You also need to pass some pool options (excludingcreate
,destroy
andvalidate
functions which are controlled by this dialect),min
&max
connections at the very least.Example: