不要怂,就是干,撸起袖子干!

Commit 48eafaa5 by Simon Schick Committed by GitHub

fix(types): add dialectModule types (#10863)

1 parent 4de34c55
...@@ -115,6 +115,7 @@ export interface OperatorsAliases { ...@@ -115,6 +115,7 @@ export interface OperatorsAliases {
*/ */
export interface Config { export interface Config {
readonly database: string; readonly database: string;
readonly dialectModule?: object;
readonly host?: string; readonly host?: string;
readonly port?: string; readonly port?: string;
readonly username: string; readonly username: string;
...@@ -156,6 +157,15 @@ export interface Options extends Logging { ...@@ -156,6 +157,15 @@ export interface Options extends Logging {
dialect?: Dialect; dialect?: Dialect;
/** /**
* If specified, will use the provided module as the dialect.
*
* @example
* `dialectModule: require('@myorg/tedious'),`
*/
dialectModule?: object;
/**
* If specified, load the dialect library from this path. For example, if you want to use pg.js instead of * If specified, load the dialect library from this path. For example, if you want to use pg.js instead of
* pg when connecting to a pg database, you should specify 'pg.js' here * pg when connecting to a pg database, you should specify 'pg.js' here
*/ */
......
...@@ -12,7 +12,8 @@ export const sequelize = new Sequelize({ ...@@ -12,7 +12,8 @@ export const sequelize = new Sequelize({
retry: { retry: {
max: 123, max: 123,
match: ['hurr'], match: ['hurr'],
} },
dialectModule: {},
}); });
const conn = sequelize.connectionManager; const conn = sequelize.connectionManager;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!