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 351e871b
authored
Dec 16, 2015
by
Sushant
Committed by
Sushant
Jan 05, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix(#4953) : Return null until MySQL implements EMPTY keyword for WKT
1 parent
cbefbbca
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
2 deletions
lib/dialects/abstract/query.js
lib/dialects/mysql/data-types.js
test/integration/data-types.test.js
lib/dialects/abstract/query.js
View file @
351e871
lib/dialects/mysql/data-types.js
View file @
351e871
...
...
@@ -61,7 +61,9 @@ module.exports = function (BaseTypes) {
GEOMETRY
.
parse
=
GEOMETRY
.
prototype
.
parse
=
function
(
value
)
{
value
=
value
.
buffer
();
if
(
value
===
null
)
{
//MySQL doesn't support POINT EMPTY, https://dev.mysql.com/worklog/task/?id=2381
if
(
value
===
null
){
return
null
;
}
...
...
test/integration/data-types.test.js
View file @
351e871
...
...
@@ -292,8 +292,13 @@ describe(Support.getTestDialectTeaser('DataTypes'), function() {
//This case throw unhandled exception
return
User
.
findAll
();
}).
then
(
function
(
users
){
if
(
dialect
===
'mysql'
)
{
// MySQL will return NULL, becuase they lack EMPTY geometry data support.
expect
(
users
[
0
].
field
).
to
.
be
.
eql
(
null
);
}
else
{
//it contains the null GEOMETRY data
expect
(
users
[
0
].
field
).
to
.
be
.
null
;
expect
(
users
[
0
].
field
).
to
.
be
.
deep
.
eql
(
point
);
}
});
}
});
...
...
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