Skip to content

Commit

Permalink
fix: insert array into json column (#5321)
Browse files Browse the repository at this point in the history
* fix: insert array into json column

* fix: determine array
  • Loading branch information
mingoing committed Sep 2, 2022
1 parent 864530c commit dc6dbbf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/client.js
Expand Up @@ -396,7 +396,7 @@ class Client extends EventEmitter {
if (i > 0) str += ', ';
let value = values[i];
// json columns can have object in values.
if (isPlainObject(value)) {
if (isPlainObject(value) || Array.isArray(value)) {
value = JSON.stringify(value);
}
str += this.parameter(
Expand Down

0 comments on commit dc6dbbf

Please sign in to comment.