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 521637a5
authored
Apr 18, 2015
by
Ruben Bridgewater
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reduce logging
1 parent
2067d2cb
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
0 additions
and
10 deletions
lib/sequelize.js
test/integration/model/and-or-where.test.js
test/integration/model/create.test.js
test/integration/sequelize.test.js
test/integration/vectors.test.js
lib/sequelize.js
View file @
521637a
...
@@ -184,7 +184,6 @@ module.exports = (function() {
...
@@ -184,7 +184,6 @@ module.exports = (function() {
var
Dialect
=
require
(
'./dialects/'
+
this
.
getDialect
());
var
Dialect
=
require
(
'./dialects/'
+
this
.
getDialect
());
this
.
dialect
=
new
Dialect
(
this
);
this
.
dialect
=
new
Dialect
(
this
);
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
log
(
err
.
stack
);
throw
new
Error
(
'The dialect '
+
this
.
getDialect
()
+
' is not supported. ('
+
err
+
')'
);
throw
new
Error
(
'The dialect '
+
this
.
getDialect
()
+
' is not supported. ('
+
err
+
')'
);
}
}
...
...
test/integration/model/and-or-where.test.js
View file @
521637a
...
@@ -70,7 +70,6 @@ describe(Support.getTestDialectTeaser('Model'), function() {
...
@@ -70,7 +70,6 @@ describe(Support.getTestDialectTeaser('Model'), function() {
})[
Support
.
getTestDialect
()];
})[
Support
.
getTestDialect
()];
if
(
!
expectation
)
{
if
(
!
expectation
)
{
console
.
log
(
sql
);
throw
new
Error
(
'Undefined expectation for '
+
Support
.
getTestDialect
());
throw
new
Error
(
'Undefined expectation for '
+
Support
.
getTestDialect
());
}
}
expect
(
sql
).
to
.
contain
(
expectation
);
expect
(
sql
).
to
.
contain
(
expectation
);
...
@@ -92,7 +91,6 @@ describe(Support.getTestDialectTeaser('Model'), function() {
...
@@ -92,7 +91,6 @@ describe(Support.getTestDialectTeaser('Model'), function() {
})[
Support
.
getTestDialect
()];
})[
Support
.
getTestDialect
()];
if
(
!
expectation
)
{
if
(
!
expectation
)
{
console
.
log
(
sql
);
throw
new
Error
(
'Undefined expectation for '
+
Support
.
getTestDialect
());
throw
new
Error
(
'Undefined expectation for '
+
Support
.
getTestDialect
());
}
}
expect
(
sql
).
to
.
contain
(
expectation
);
expect
(
sql
).
to
.
contain
(
expectation
);
...
@@ -132,7 +130,6 @@ describe(Support.getTestDialectTeaser('Model'), function() {
...
@@ -132,7 +130,6 @@ describe(Support.getTestDialectTeaser('Model'), function() {
})[
Support
.
getTestDialect
()];
})[
Support
.
getTestDialect
()];
if
(
!
expectation
)
{
if
(
!
expectation
)
{
console
.
log
(
sql
);
throw
new
Error
(
'Undefined expectation for '
+
Support
.
getTestDialect
());
throw
new
Error
(
'Undefined expectation for '
+
Support
.
getTestDialect
());
}
}
...
@@ -170,7 +167,6 @@ describe(Support.getTestDialectTeaser('Model'), function() {
...
@@ -170,7 +167,6 @@ describe(Support.getTestDialectTeaser('Model'), function() {
})[
Support
.
getTestDialect
()];
})[
Support
.
getTestDialect
()];
if
(
!
expectation
)
{
if
(
!
expectation
)
{
console
.
log
(
sql
);
throw
new
Error
(
'Undefined expectation for '
+
Support
.
getTestDialect
());
throw
new
Error
(
'Undefined expectation for '
+
Support
.
getTestDialect
());
}
}
...
...
test/integration/model/create.test.js
View file @
521637a
...
@@ -1620,9 +1620,7 @@ describe(Support.getTestDialectTeaser('Model'), function() {
...
@@ -1620,9 +1620,7 @@ describe(Support.getTestDialectTeaser('Model'), function() {
data
.
push
({
uniqueName
:
'Michael'
,
secretValue
:
'26'
});
data
.
push
({
uniqueName
:
'Michael'
,
secretValue
:
'26'
});
return
self
.
User
.
bulkCreate
(
data
,
{
fields
:
[
'uniqueName'
,
'secretValue'
],
ignoreDuplicates
:
true
}).
catch
(
function
(
err
)
{
return
self
.
User
.
bulkCreate
(
data
,
{
fields
:
[
'uniqueName'
,
'secretValue'
],
ignoreDuplicates
:
true
}).
catch
(
function
(
err
)
{
expect
(
err
).
to
.
exist
;
if
(
dialect
===
'mssql'
)
{
if
(
dialect
===
'mssql'
)
{
console
.
log
(
err
.
message
);
expect
(
err
.
message
).
to
.
match
(
/mssql does not support the
\'
ignoreDuplicates
\'
option./
);
expect
(
err
.
message
).
to
.
match
(
/mssql does not support the
\'
ignoreDuplicates
\'
option./
);
}
else
{
}
else
{
expect
(
err
.
message
).
to
.
match
(
/postgres does not support the
\'
ignoreDuplicates
\'
option./
);
expect
(
err
.
message
).
to
.
match
(
/postgres does not support the
\'
ignoreDuplicates
\'
option./
);
...
...
test/integration/sequelize.test.js
View file @
521637a
...
@@ -113,7 +113,6 @@ describe(Support.getTestDialectTeaser('Sequelize'), function() {
...
@@ -113,7 +113,6 @@ describe(Support.getTestDialectTeaser('Sequelize'), function() {
.
sequelizeWithInvalidConnection
.
sequelizeWithInvalidConnection
.
authenticate
()
.
authenticate
()
.
catch
(
function
(
err
)
{
.
catch
(
function
(
err
)
{
console
.
log
(
err
.
message
);
expect
(
expect
(
err
.
message
.
match
(
/connect ECONNREFUSED/
)
||
err
.
message
.
match
(
/connect ECONNREFUSED/
)
||
err
.
message
.
match
(
/invalid port number/
)
||
err
.
message
.
match
(
/invalid port number/
)
||
...
...
test/integration/vectors.test.js
View file @
521637a
...
@@ -20,8 +20,6 @@ describe(Support.getTestDialectTeaser('Vectors'), function() {
...
@@ -20,8 +20,6 @@ describe(Support.getTestDialectTeaser('Vectors'), function() {
return
Student
.
sync
({
force
:
true
}).
then
(
function
()
{
return
Student
.
sync
({
force
:
true
}).
then
(
function
()
{
return
Student
.
create
({
return
Student
.
create
({
name
:
'Robert\\\'); DROP TABLE "students"; --'
name
:
'Robert\\\'); DROP TABLE "students"; --'
},
{
logging
:
console
.
log
}).
then
(
function
(
result
)
{
}).
then
(
function
(
result
)
{
expect
(
result
.
get
(
'name'
)).
to
.
equal
(
'Robert\\\'); DROP TABLE "students"; --'
);
expect
(
result
.
get
(
'name'
)).
to
.
equal
(
'Robert\\\'); DROP TABLE "students"; --'
);
return
Student
.
findAll
();
return
Student
.
findAll
();
...
...
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