Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
sidorares committed Oct 11, 2021
1 parent 9e3a5ae commit 04cee65
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/packets/execute.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,16 @@ function toParameter(value, encoding, timezone, parameterHints) {
return Packet.prototype.writeDate.call(this, value, timezone);
};
return { value, type, length, writer };
} else if (isJSON(value)) {
}

if (isJSON(value)) {
value = JSON.stringify(value);
type = Types.JSON;
length = Packet.lengthCodedStringLength(value, encoding);
return { value, type, length, writer };
} else if (Buffer.isBuffer(value)) {
}

if (Buffer.isBuffer(value)) {
length = Packet.lengthCodedNumberLength(value.length) + value.length;
writer = Packet.prototype.writeLengthCodedBuffer;
type = Types.VAR_STRING;
Expand Down

0 comments on commit 04cee65

Please sign in to comment.