We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 247fbac commit a9e6ea3Copy full SHA for a9e6ea3
1 file changed
src/tests/expressions/simple/parse-complex.ts
@@ -0,0 +1,20 @@
1
+import assert from "assert";
2
+import Sql from "../../../sql/Sql.js";
3
+import QueryCompiler from "../../../compiler/QueryCompiler.js";
4
+
5
+export default function () {
6
7
+ const compiler = QueryCompiler.instance;
8
9
+ const name = "Akash";
10
11
+ let r = compiler.execute({ name }, (p) => (x) => x.id ? 1 : -1);
12
+ assert.equal("(CASE WHEN x.id THEN 1 ELSE -1 END)", r.text);
13
14
+ r = compiler.execute({ name }, (p) => (x) => x.id ? 1 : -(5*1));
15
+ assert.equal("(CASE WHEN x.id THEN 1 ELSE (-5 * 1) END)", r.text);
16
17
18
+}
19
20
+type KeyCode = { name: string, code: number, key: string };
0 commit comments