From 93814594580fa964fede1064e0d1da9270c0272e Mon Sep 17 00:00:00 2001 From: Mikhail Goncharov <22234117+MikhailGoncharov@users.noreply.github.com> Date: Wed, 9 Jun 2021 10:43:10 +0200 Subject: [PATCH 1/3] Sync with cds-runtime --- test/cds.ql.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cds.ql.test.js b/test/cds.ql.test.js index 3f070111..62fd9488 100644 --- a/test/cds.ql.test.js +++ b/test/cds.ql.test.js @@ -309,7 +309,7 @@ describe('cds.ql → cqn', () => { 'and', { ref: ['args'] }, 'in', - { val: args }, + { list: [{ val: 'foo' }, { val: 'bar' }, { val: 3 }] }, 'and', '(', //> this one is missing, and that's changing the logic -> that's a BUG { ref: ['x'] }, From c2437fc419cbf30aceb17566dafec9b403a2efd2 Mon Sep 17 00:00:00 2001 From: Mikhail Goncharov <22234117+MikhailGoncharov@users.noreply.github.com> Date: Wed, 9 Jun 2021 12:49:39 +0200 Subject: [PATCH 2/3] Handle cds versions --- test/cds.ql.test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/cds.ql.test.js b/test/cds.ql.test.js index 62fd9488..80b89ab1 100644 --- a/test/cds.ql.test.js +++ b/test/cds.ql.test.js @@ -280,7 +280,7 @@ describe('cds.ql → cqn', () => { ).to.eql({ SELECT: { from: { ref: ['Foo'] }, - where: cdr + where: cds.version >= '5.3.0' ? [ // '(', //> this one is not required { ref: ['ID'] }, @@ -289,7 +289,7 @@ describe('cds.ql → cqn', () => { 'and', { ref: ['args'] }, 'in', - { val: args }, + { list: [{ val: 'foo' }, { val: 'bar' }, { val: 3 }] }, 'and', '(', //> this one is missing, and that's changing the logic -> that's a BUG { ref: ['x'] }, @@ -309,7 +309,7 @@ describe('cds.ql → cqn', () => { 'and', { ref: ['args'] }, 'in', - { list: [{ val: 'foo' }, { val: 'bar' }, { val: 3 }] }, + { val: args }, 'and', '(', //> this one is missing, and that's changing the logic -> that's a BUG { ref: ['x'] }, From 95b01e7d7acd83943d952daace8614946c9d9f14 Mon Sep 17 00:00:00 2001 From: Mikhail Goncharov <22234117+MikhailGoncharov@users.noreply.github.com> Date: Wed, 9 Jun 2021 13:39:12 +0200 Subject: [PATCH 3/3] Do not trim quotes --- test/cds.ql.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cds.ql.test.js b/test/cds.ql.test.js index 80b89ab1..dd203f5c 100644 --- a/test/cds.ql.test.js +++ b/test/cds.ql.test.js @@ -289,7 +289,7 @@ describe('cds.ql → cqn', () => { 'and', { ref: ['args'] }, 'in', - { list: [{ val: 'foo' }, { val: 'bar' }, { val: 3 }] }, + { list: args.map(val => ({ val })) }, 'and', '(', //> this one is missing, and that's changing the logic -> that's a BUG { ref: ['x'] },