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 687d23a9
authored
Aug 08, 2016
by
Ali Taheri Moghaddar
Committed by
Sushant
Aug 08, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ease dialect require for webpack (#6388)
1 parent
58573c19
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
lib/dialects/mssql/connection-manager.js
lib/dialects/sqlite/connection-manager.js
lib/dialects/mssql/connection-manager.js
View file @
687d23a
...
@@ -16,7 +16,11 @@ class ConnectionManager extends AbstractConnectionManager {
...
@@ -16,7 +16,11 @@ class ConnectionManager extends AbstractConnectionManager {
this
.
sequelize
=
sequelize
;
this
.
sequelize
=
sequelize
;
this
.
sequelize
.
config
.
port
=
this
.
sequelize
.
config
.
port
||
1433
;
this
.
sequelize
.
config
.
port
=
this
.
sequelize
.
config
.
port
||
1433
;
try
{
try
{
this
.
lib
=
require
(
sequelize
.
config
.
dialectModulePath
||
'tedious'
);
if
(
sequelize
.
config
.
dialectModulePath
)
{
this
.
lib
=
require
(
sequelize
.
config
.
dialectModulePath
);
}
else
{
this
.
lib
=
require
(
'tedious'
);
}
}
catch
(
err
)
{
}
catch
(
err
)
{
if
(
err
.
code
===
'MODULE_NOT_FOUND'
)
{
if
(
err
.
code
===
'MODULE_NOT_FOUND'
)
{
throw
new
Error
(
'Please install tedious package manually'
);
throw
new
Error
(
'Please install tedious package manually'
);
...
@@ -53,7 +57,7 @@ class ConnectionManager extends AbstractConnectionManager {
...
@@ -53,7 +57,7 @@ class ConnectionManager extends AbstractConnectionManager {
}
}
// The 'tedious' driver needs domain property to be in the main Connection config object
// The 'tedious' driver needs domain property to be in the main Connection config object
if
(
config
.
dialectOptions
.
domain
)
{
if
(
config
.
dialectOptions
.
domain
)
{
connectionConfig
.
domain
=
config
.
dialectOptions
.
domain
;
connectionConfig
.
domain
=
config
.
dialectOptions
.
domain
;
}
}
...
...
lib/dialects/sqlite/connection-manager.js
View file @
687d23a
...
@@ -21,7 +21,11 @@ class ConnectionManager extends AbstractConnectionManager {
...
@@ -21,7 +21,11 @@ class ConnectionManager extends AbstractConnectionManager {
if
(
this
.
sequelize
.
options
.
host
===
'localhost'
)
delete
this
.
sequelize
.
options
.
host
;
if
(
this
.
sequelize
.
options
.
host
===
'localhost'
)
delete
this
.
sequelize
.
options
.
host
;
try
{
try
{
this
.
lib
=
require
(
sequelize
.
config
.
dialectModulePath
||
'sqlite3'
).
verbose
();
if
(
sequelize
.
config
.
dialectModulePath
)
{
this
.
lib
=
require
(
sequelize
.
config
.
dialectModulePath
).
verbose
();
}
else
{
this
.
lib
=
require
(
'sqlite3'
).
verbose
();
}
}
catch
(
err
)
{
}
catch
(
err
)
{
if
(
err
.
code
===
'MODULE_NOT_FOUND'
)
{
if
(
err
.
code
===
'MODULE_NOT_FOUND'
)
{
throw
new
Error
(
'Please install sqlite3 package manually'
);
throw
new
Error
(
'Please install sqlite3 package manually'
);
...
...
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