@crvouga/sqlite-mem 1.7.0 → 1.8.0

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/unstable.js CHANGED
@@ -3190,8 +3190,14 @@ function evalExpr(expr, ctx) {
3190
3190
  return truth === null ? null : booleanValue(!truth);
3191
3191
  }
3192
3192
  if (value === null) return null;
3193
- if (expr.op === "+") return asNumber(numberValue(value));
3194
- if (expr.op === "-") return asNumber(-numberValue(value));
3193
+ if (expr.op === "+") {
3194
+ const n = asNumber(numberValue(value));
3195
+ return storageClassOf(value) === "real" ? asSqlReal(n) : n;
3196
+ }
3197
+ if (expr.op === "-") {
3198
+ const n = asNumber(-numberValue(value));
3199
+ return storageClassOf(value) === "real" ? asSqlReal(n) : n;
3200
+ }
3195
3201
  return ~integerValue(value);
3196
3202
  }
3197
3203
  case "is_bool": {