@restura/core 0.1.0-alpha.36 → 0.1.0-alpha.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1569,10 +1569,11 @@ function insertObjectQuery(table, obj) {
|
|
|
1569
1569
|
const params = Object.values(obj);
|
|
1570
1570
|
const columns = keys.map((column) => escapeColumnName(column)).join(", ");
|
|
1571
1571
|
const values = params.map((value) => SQL`${value}`).join(", ");
|
|
1572
|
-
|
|
1572
|
+
let query = `
|
|
1573
1573
|
INSERT INTO "${table}" (${columns})
|
|
1574
1574
|
VALUES (${values})
|
|
1575
1575
|
RETURNING *`;
|
|
1576
|
+
query = query.replace(/'(\?)'/, "?");
|
|
1576
1577
|
return query;
|
|
1577
1578
|
}
|
|
1578
1579
|
function updateObjectQuery(table, obj, whereStatement) {
|
|
@@ -1870,7 +1871,8 @@ column = left:text "." right:text { return \`\${quoteSqlIdentity(left)}.\${quot
|
|
|
1870
1871
|
text:text { return quoteSqlIdentity(text); }
|
|
1871
1872
|
|
|
1872
1873
|
|
|
1873
|
-
text = text:[a-z0-9 \\t\\r\\n\\-_:@]i+ { return text.join(""); }
|
|
1874
|
+
text = text:[a-z0-9 \\t\\r\\n\\-_:@']i+ { return text.join(""); }
|
|
1875
|
+
|
|
1874
1876
|
|
|
1875
1877
|
type = "type" _ ":" _ type:typeString { return type; }
|
|
1876
1878
|
typeString = text:"startsWith" { return function(column, value) { return \`\${column} ILIKE '\${format.literal(value).slice(1,-1)}%'\`; } } /
|