String values for the insert method
Closed this issue · 1 comments
Yaroslav-BV commented
Hello, @shwetasrivastava.
You need to add validation to the insert method for string values to wrap them in single quotes. When converting an array to a string, quotes are not inserted for string values.
For example, this can be achieved as follows:
./src/functions/insert.js
// before
const values = Object.values(data);
// after
const values = Object.values(data).map(value => {
if(typeof value === "string" && !!value) return `'${value}'`;
return value;
});
Regards, Yaroslav.
shwetasrivastava commented