Skip to content

Commit 97a242a

Browse files
authored
Merge pull request #2 from m3ntorsky/main
fix(qb/js): fix some errors.
2 parents 6f637e5 + 9b568ae commit 97a242a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

plugin_files/bin/scripting/database/mysql_qb.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ function GenerateColumnType(tblName, columnName, columnRules, version, db) {
162162
}
163163

164164
function MySQL_QB(db) {
165+
165166
return {
166167
db,
167168
tableName: "",
@@ -181,9 +182,9 @@ function MySQL_QB(db) {
181182

182183
formatSQLValue(value) {
183184
if (value === null || value === undefined) return "NULL";
184-
if (typeof value === "object") return `"${db.escapeString(JSON.stringify(value))}"`;
185-
if (typeof value === "string") return `"${db.escapeString(value)}"`;
186-
return String(value);
185+
else if (typeof value === "object") return `"${db.EscapeString(JSON.stringify(value))}"`;
186+
else if (typeof value === "string") return `"${db.EscapeString(value)}"`;
187+
else return String(value);
187188
},
188189

189190
Table(tblName) {

0 commit comments

Comments
 (0)