Handle cds versions

This commit is contained in:
Mikhail Goncharov
2021-06-09 12:49:39 +02:00
committed by GitHub
parent 9381459458
commit c2437fc419

View File

@@ -280,7 +280,7 @@ describe('cds.ql → cqn', () => {
).to.eql({ ).to.eql({
SELECT: { SELECT: {
from: { ref: ['Foo'] }, from: { ref: ['Foo'] },
where: cdr where: cds.version >= '5.3.0'
? [ ? [
// '(', //> this one is not required // '(', //> this one is not required
{ ref: ['ID'] }, { ref: ['ID'] },
@@ -289,7 +289,7 @@ describe('cds.ql → cqn', () => {
'and', 'and',
{ ref: ['args'] }, { ref: ['args'] },
'in', 'in',
{ val: args }, { list: [{ val: 'foo' }, { val: 'bar' }, { val: 3 }] },
'and', 'and',
'(', //> this one is missing, and that's changing the logic -> that's a BUG '(', //> this one is missing, and that's changing the logic -> that's a BUG
{ ref: ['x'] }, { ref: ['x'] },
@@ -309,7 +309,7 @@ describe('cds.ql → cqn', () => {
'and', 'and',
{ ref: ['args'] }, { ref: ['args'] },
'in', 'in',
{ list: [{ val: 'foo' }, { val: 'bar' }, { val: 3 }] }, { val: args },
'and', 'and',
'(', //> this one is missing, and that's changing the logic -> that's a BUG '(', //> this one is missing, and that's changing the logic -> that's a BUG
{ ref: ['x'] }, { ref: ['x'] },