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 54ff01f4
authored
Sep 23, 2013
by
Po-Ying Chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
node-mysql options
1 parent
2ba78f18
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
lib/dialects/mysql/connector-manager.js
lib/dialects/mysql/connector-manager.js
View file @
54ff01f
...
...
@@ -253,17 +253,25 @@ module.exports = (function() {
}
var
connect
=
function
(
done
,
config
)
{
var
emitter
=
new
(
require
(
'events'
).
EventEmitter
)()
config
=
config
||
this
.
config
var
connection
=
mysql
.
createConnection
({
var
emitter
=
new
(
require
(
'events'
).
EventEmitter
)()
var
connectionConfig
=
{
host
:
config
.
host
,
port
:
config
.
port
,
user
:
config
.
username
,
password
:
config
.
password
,
database
:
config
.
database
,
timezone
:
'Z'
})
};
if
(
config
.
nodeMysql
)
{
Object
.
keys
(
config
.
nodeMysql
).
forEach
(
function
(
key
)
{
connectionConfig
[
key
]
=
config
.
nodeMysql
[
key
];
});
}
var
connection
=
mysql
.
createConnection
(
connectionConfig
);
connection
.
connect
(
function
(
err
)
{
if
(
err
)
{
...
...
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