@ronin/compiler 0.8.1 → 0.8.2

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.
Files changed (2) hide show
  1. package/dist/index.js +4 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -106,7 +106,10 @@ var splitQuery = (query) => {
106
106
  // src/utils/statement.ts
107
107
  var prepareStatementValue = (statementParams, value) => {
108
108
  if (value === null) return "NULL";
109
- if (!statementParams) return JSON.stringify(value);
109
+ if (!statementParams) {
110
+ const valueString = typeof value === "object" ? JSON.stringify(value) : value.toString();
111
+ return `'${valueString}'`;
112
+ }
110
113
  let formattedValue = value;
111
114
  if (Array.isArray(value) || isObject(value)) {
112
115
  formattedValue = JSON.stringify(value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ronin/compiler",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "type": "module",
5
5
  "description": "Compiles RONIN queries to SQL statements.",
6
6
  "publishConfig": {