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 c3b65136
authored
May 25, 2018
by
Sushant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: use Buffer.from
1 parent
599e1bd7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
lib/data-types.js
lib/dialects/postgres/data-types.js
lib/data-types.js
View file @
c3b6513
...
@@ -515,9 +515,9 @@ BLOB.prototype.escape = false;
...
@@ -515,9 +515,9 @@ BLOB.prototype.escape = false;
BLOB
.
prototype
.
_stringify
=
function
_stringify
(
value
)
{
BLOB
.
prototype
.
_stringify
=
function
_stringify
(
value
)
{
if
(
!
Buffer
.
isBuffer
(
value
))
{
if
(
!
Buffer
.
isBuffer
(
value
))
{
if
(
Array
.
isArray
(
value
))
{
if
(
Array
.
isArray
(
value
))
{
value
=
new
Buffer
(
value
);
value
=
Buffer
.
from
(
value
);
}
else
{
}
else
{
value
=
new
Buffer
(
value
.
toString
());
value
=
Buffer
.
from
(
value
.
toString
());
}
}
}
}
const
hex
=
value
.
toString
(
'hex'
);
const
hex
=
value
.
toString
(
'hex'
);
...
...
lib/dialects/postgres/data-types.js
View file @
c3b6513
...
@@ -426,7 +426,7 @@ module.exports = BaseTypes => {
...
@@ -426,7 +426,7 @@ module.exports = BaseTypes => {
};
};
GEOMETRY
.
parse
=
GEOMETRY
.
prototype
.
parse
=
function
parse
(
value
)
{
GEOMETRY
.
parse
=
GEOMETRY
.
prototype
.
parse
=
function
parse
(
value
)
{
const
b
=
new
Buffer
(
value
,
'hex'
);
const
b
=
Buffer
.
from
(
value
,
'hex'
);
return
wkx
.
Geometry
.
parse
(
b
).
toGeoJSON
();
return
wkx
.
Geometry
.
parse
(
b
).
toGeoJSON
();
};
};
...
@@ -462,7 +462,7 @@ module.exports = BaseTypes => {
...
@@ -462,7 +462,7 @@ module.exports = BaseTypes => {
};
};
GEOGRAPHY
.
parse
=
GEOGRAPHY
.
prototype
.
parse
=
function
parse
(
value
)
{
GEOGRAPHY
.
parse
=
GEOGRAPHY
.
prototype
.
parse
=
function
parse
(
value
)
{
const
b
=
new
Buffer
(
value
,
'hex'
);
const
b
=
Buffer
.
from
(
value
,
'hex'
);
return
wkx
.
Geometry
.
parse
(
b
).
toGeoJSON
();
return
wkx
.
Geometry
.
parse
(
b
).
toGeoJSON
();
};
};
...
...
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