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 856be984
authored
Sep 27, 2013
by
Sascha Depold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dialectOptions
1 parent
e2a2c654
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
12 deletions
lib/dialects/mysql/connector-manager.js
lib/sequelize.js
test/configuration.test.js
test/support.js
lib/dialects/mysql/connector-manager.js
View file @
856be98
...
@@ -265,9 +265,9 @@ module.exports = (function() {
...
@@ -265,9 +265,9 @@ module.exports = (function() {
timezone
:
'Z'
timezone
:
'Z'
};
};
if
(
config
.
connection
Options
)
{
if
(
config
.
dialect
Options
)
{
Object
.
keys
(
config
.
connection
Options
).
forEach
(
function
(
key
)
{
Object
.
keys
(
config
.
dialect
Options
).
forEach
(
function
(
key
)
{
connectionConfig
[
key
]
=
config
.
connection
Options
[
key
];
connectionConfig
[
key
]
=
config
.
dialect
Options
[
key
];
});
});
}
}
...
...
lib/sequelize.js
View file @
856be98
...
@@ -104,7 +104,7 @@ module.exports = (function() {
...
@@ -104,7 +104,7 @@ module.exports = (function() {
replication
:
this
.
options
.
replication
,
replication
:
this
.
options
.
replication
,
dialectModulePath
:
this
.
options
.
dialectModulePath
,
dialectModulePath
:
this
.
options
.
dialectModulePath
,
maxConcurrentQueries
:
this
.
options
.
maxConcurrentQueries
,
maxConcurrentQueries
:
this
.
options
.
maxConcurrentQueries
,
connectionOptions
:
this
.
options
.
connection
Options
,
dialectOptions
:
this
.
options
.
dialect
Options
,
}
}
try
{
try
{
...
...
test/configuration.test.js
View file @
856be98
...
@@ -103,7 +103,7 @@ describe(Support.getTestDialectTeaser("Configuration"), function() {
...
@@ -103,7 +103,7 @@ describe(Support.getTestDialectTeaser("Configuration"), function() {
it
(
'should accept four parameters (database, username, password, options)'
,
function
(
done
)
{
it
(
'should accept four parameters (database, username, password, options)'
,
function
(
done
)
{
var
sequelize
=
new
Sequelize
(
'dbname'
,
'root'
,
'pass'
,
{
var
sequelize
=
new
Sequelize
(
'dbname'
,
'root'
,
'pass'
,
{
port
:
999
,
port
:
999
,
connection
Options
:
{
dialect
Options
:
{
supportBigNumbers
:
true
,
supportBigNumbers
:
true
,
bigNumberStrings
:
true
bigNumberStrings
:
true
}
}
...
@@ -114,8 +114,8 @@ describe(Support.getTestDialectTeaser("Configuration"), function() {
...
@@ -114,8 +114,8 @@ describe(Support.getTestDialectTeaser("Configuration"), function() {
expect
(
config
.
username
).
to
.
equal
(
'root'
)
expect
(
config
.
username
).
to
.
equal
(
'root'
)
expect
(
config
.
password
).
to
.
equal
(
'pass'
)
expect
(
config
.
password
).
to
.
equal
(
'pass'
)
expect
(
config
.
port
).
to
.
equal
(
999
)
expect
(
config
.
port
).
to
.
equal
(
999
)
expect
(
config
.
connection
Options
.
supportBigNumbers
).
to
.
be
.
true
expect
(
config
.
dialect
Options
.
supportBigNumbers
).
to
.
be
.
true
expect
(
config
.
connection
Options
.
bigNumberStrings
).
to
.
be
.
true
expect
(
config
.
dialect
Options
.
bigNumberStrings
).
to
.
be
.
true
done
()
done
()
})
})
})
})
...
...
test/support.js
View file @
856be98
...
@@ -32,11 +32,11 @@ var Support = {
...
@@ -32,11 +32,11 @@ var Support = {
options
.
pool
=
options
.
pool
||
config
.
pool
options
.
pool
=
options
.
pool
||
config
.
pool
var
sequelizeOptions
=
{
var
sequelizeOptions
=
{
logging
:
options
.
logging
,
logging
:
options
.
logging
,
dialect
:
options
.
dialect
,
dialect
:
options
.
dialect
,
port
:
options
.
port
||
process
.
env
.
SEQ_PORT
||
config
[
options
.
dialect
].
port
,
port
:
options
.
port
||
process
.
env
.
SEQ_PORT
||
config
[
options
.
dialect
].
port
,
pool
:
options
.
pool
,
pool
:
options
.
pool
,
connectionOptions
:
options
.
connection
Options
||
{}
dialectOptions
:
options
.
dialect
Options
||
{}
}
}
if
(
!!
options
.
host
)
{
if
(
!!
options
.
host
)
{
...
...
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