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 5f70c51b
authored
Oct 28, 2015
by
Alex Booker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made unsupported dialect error message clearer.
Closes #4747.
1 parent
e548b2cd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
lib/sequelize.js
test/integration/configuration.test.js
lib/sequelize.js
View file @
5f70c51
...
@@ -202,7 +202,7 @@ var Sequelize = function(database, username, password, options) {
...
@@ -202,7 +202,7 @@ var Sequelize = function(database, username, password, options) {
}
}
this
.
dialect
=
new
Dialect
(
this
);
this
.
dialect
=
new
Dialect
(
this
);
}
catch
(
err
)
{
}
catch
(
err
)
{
throw
new
Error
(
'The dialect '
+
this
.
getDialect
()
+
' is not supported. ('
+
err
+
')'
);
throw
new
Error
(
'The dialect '
+
this
.
getDialect
()
+
' is not supported.
Supported dialects: mariadb, mssql, mysql, postgres, and sqlite.
('
+
err
+
')'
);
}
}
this
.
dialect
.
QueryGenerator
.
typeValidation
=
options
.
typeValidation
;
this
.
dialect
.
QueryGenerator
.
typeValidation
=
options
.
typeValidation
;
...
...
test/integration/configuration.test.js
View file @
5f70c51
...
@@ -57,7 +57,7 @@ describe(Support.getTestDialectTeaser('Configuration'), function() {
...
@@ -57,7 +57,7 @@ describe(Support.getTestDialectTeaser('Configuration'), function() {
it
(
'when we don\'t have a valid dialect.'
,
function
()
{
it
(
'when we don\'t have a valid dialect.'
,
function
()
{
expect
(
function
()
{
expect
(
function
()
{
new
Sequelize
(
config
[
dialect
].
database
,
config
[
dialect
].
username
,
config
[
dialect
].
password
,
{
host
:
'0.0.0.1'
,
port
:
config
[
dialect
].
port
,
dialect
:
undefined
});
new
Sequelize
(
config
[
dialect
].
database
,
config
[
dialect
].
username
,
config
[
dialect
].
password
,
{
host
:
'0.0.0.1'
,
port
:
config
[
dialect
].
port
,
dialect
:
undefined
});
}).
to
.
throw
(
Error
,
'The dialect undefined is not supported.'
);
}).
to
.
throw
(
Error
,
'The dialect undefined is not supported.
Supported dialects: mariadb, mssql, mysql, postgres, and sqlite.
'
);
});
});
});
});
...
...
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