Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
public
/
sequelize
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
不要怂,就是干,撸起袖子干!
Commit 48eafaa5
authored
Apr 30, 2019
by
Simon Schick
Committed by
GitHub
Apr 30, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(types): add dialectModule types (#10863)
1 parent
4de34c55
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletions
types/lib/sequelize.d.ts
types/test/sequelize.ts
types/lib/sequelize.d.ts
View file @
48eafaa
...
@@ -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
*/
*/
...
...
types/test/sequelize.ts
View file @
48eafaa
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment