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 9aa3773f
authored
Jan 24, 2016
by
Mick Hansen
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5291 from stuartpb/patch-1
Fix "the dialect is not supported" error
2 parents
04dbc53d
b1a86cf7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
24 deletions
lib/sequelize.js
lib/sequelize.js
View file @
9aa3773
...
@@ -188,31 +188,29 @@ var Sequelize = function(database, username, password, options) {
...
@@ -188,31 +188,29 @@ var Sequelize = function(database, username, password, options) {
dialectOptions
:
this
.
options
.
dialectOptions
dialectOptions
:
this
.
options
.
dialectOptions
};
};
try
{
var
Dialect
;
var
Dialect
;
// Requiring the dialect in a switch-case to keep the
// Requiring the dialect in a switch-case to keep the
// require calls static. (Browserify fix)
// require calls static. (Browserify fix)
switch
(
this
.
getDialect
()){
switch
(
this
.
getDialect
()){
case
'mariadb'
:
case
'mariadb'
:
Dialect
=
require
(
'./dialects/mariadb'
);
Dialect
=
require
(
'./dialects/mariadb'
);
break
;
break
;
case
'mssql'
:
case
'mssql'
:
Dialect
=
require
(
'./dialects/mssql'
);
Dialect
=
require
(
'./dialects/mssql'
);
break
;
break
;
case
'mysql'
:
case
'mysql'
:
Dialect
=
require
(
'./dialects/mysql'
);
Dialect
=
require
(
'./dialects/mysql'
);
break
;
break
;
case
'postgres'
:
case
'postgres'
:
Dialect
=
require
(
'./dialects/postgres'
);
Dialect
=
require
(
'./dialects/postgres'
);
break
;
break
;
case
'sqlite'
:
case
'sqlite'
:
Dialect
=
require
(
'./dialects/sqlite'
);
Dialect
=
require
(
'./dialects/sqlite'
);
break
;
break
;
default
:
}
throw
new
Error
(
'The dialect '
+
this
.
getDialect
()
+
' is not supported. Supported dialects: mariadb, mssql, mysql, postgres, and sqlite.'
);
this
.
dialect
=
new
Dialect
(
this
);
}
catch
(
err
)
{
throw
new
Error
(
'The dialect '
+
this
.
getDialect
()
+
' is not supported. Supported dialects: mariadb, mssql, mysql, postgres, and sqlite. ('
+
err
+
')'
);
}
}
this
.
dialect
=
new
Dialect
(
this
);
this
.
dialect
.
QueryGenerator
.
typeValidation
=
options
.
typeValidation
;
this
.
dialect
.
QueryGenerator
.
typeValidation
=
options
.
typeValidation
;
...
...
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