@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.js
CHANGED
|
@@ -1616,10 +1616,11 @@ function insertObjectQuery(table, obj) {
|
|
|
1616
1616
|
const params = Object.values(obj);
|
|
1617
1617
|
const columns = keys.map((column) => escapeColumnName(column)).join(", ");
|
|
1618
1618
|
const values = params.map((value) => SQL`${value}`).join(", ");
|
|
1619
|
-
|
|
1619
|
+
let query = `
|
|
1620
1620
|
INSERT INTO "${table}" (${columns})
|
|
1621
1621
|
VALUES (${values})
|
|
1622
1622
|
RETURNING *`;
|
|
1623
|
+
query = query.replace(/'(\?)'/, "?");
|
|
1623
1624
|
return query;
|
|
1624
1625
|
}
|
|
1625
1626
|
function updateObjectQuery(table, obj, whereStatement) {
|
|
@@ -1917,7 +1918,8 @@ column = left:text "." right:text { return \`\${quoteSqlIdentity(left)}.\${quot
|
|
|
1917
1918
|
text:text { return quoteSqlIdentity(text); }
|
|
1918
1919
|
|
|
1919
1920
|
|
|
1920
|
-
text = text:[a-z0-9 \\t\\r\\n\\-_:@]i+ { return text.join(""); }
|
|
1921
|
+
text = text:[a-z0-9 \\t\\r\\n\\-_:@']i+ { return text.join(""); }
|
|
1922
|
+
|
|
1921
1923
|
|
|
1922
1924
|
type = "type" _ ":" _ type:typeString { return type; }
|
|
1923
1925
|
typeString = text:"startsWith" { return function(column, value) { return \`\${column} ILIKE '\${format.literal(value).slice(1,-1)}%'\`; } } /
|