不要怂,就是干,撸起袖子干!

Commit 1bcfaa70 by Yaroslav Repeta Committed by Sushant

fix(data-types/blob): only return null for mysql binary null (#9441)

1 parent 5f7d69a7
Showing with 0 additions and 17 deletions
...@@ -36,22 +36,6 @@ module.exports = BaseTypes => { ...@@ -36,22 +36,6 @@ module.exports = BaseTypes => {
BaseTypes.GEOMETRY.types.mysql = ['GEOMETRY']; BaseTypes.GEOMETRY.types.mysql = ['GEOMETRY'];
BaseTypes.JSON.types.mysql = ['JSON']; BaseTypes.JSON.types.mysql = ['JSON'];
function BLOB(length) {
if (!(this instanceof BLOB)) return new BLOB(length);
BaseTypes.BLOB.apply(this, arguments);
}
inherits(BLOB, BaseTypes.BLOB);
BLOB.parse = function(value, options, next) {
const data = next();
if (Buffer.isBuffer(data) && data.length === 0) {
return null;
}
return data;
};
function DECIMAL(precision, scale) { function DECIMAL(precision, scale) {
if (!(this instanceof DECIMAL)) return new DECIMAL(precision, scale); if (!(this instanceof DECIMAL)) return new DECIMAL(precision, scale);
BaseTypes.DECIMAL.apply(this, arguments); BaseTypes.DECIMAL.apply(this, arguments);
...@@ -195,7 +179,6 @@ module.exports = BaseTypes => { ...@@ -195,7 +179,6 @@ module.exports = BaseTypes => {
UUID, UUID,
GEOMETRY, GEOMETRY,
DECIMAL, DECIMAL,
BLOB,
JSON: JSONTYPE JSON: JSONTYPE
}; };
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!