Prep for upcomming releases

This commit is contained in:
Daniel
2021-01-13 16:26:56 +01:00
committed by Daniel Hutzel
parent 01073fd6a5
commit c12e516f5d
2 changed files with 24 additions and 5 deletions

View File

@@ -325,7 +325,26 @@ describe('cds.ql → cqn', () => {
}) })
// using CQL fragments -> uses cds.parse.expr // using CQL fragments -> uses cds.parse.expr
expect((cqn = CQL`SELECT from Foo where ID=11 and x in ( foo, 'bar', 3)`)).to.eql({ const is_v2 = !!cds.parse.expr('(1,2)').list
if (is_v2) expect((cqn = CQL`SELECT from Foo where ID=11 and x in ( foo, 'bar', 3)`)).to.eql({
SELECT: {
from: { ref: ['Foo'] },
where: [
{ ref: ['ID'] },
'=',
{ val: ID },
'and',
{ ref: ['x'] },
'in',
{list:[
{ ref: ['foo'] },
{ val: 'bar' },
{ val: 3 },
]}
],
},
})
else expect((cqn = CQL`SELECT from Foo where ID=11 and x in ( foo, 'bar', 3)`)).to.eql({
SELECT: { SELECT: {
from: { ref: ['Foo'] }, from: { ref: ['Foo'] },
where: [ where: [

View File

@@ -42,16 +42,16 @@ describe('Messaging', ()=>{
// { ID: 111 + (++N), subject: "201", title: "Captivating", rating: N }, // { ID: 111 + (++N), subject: "201", title: "Captivating", rating: N },
// ), // ),
srv.create ('Reviews') .entries ( srv.create ('Reviews') .entries (
{ ID: 111 + (++N), subject: "201", title: "Captivating", rating: N } { ID: String(111 + (++N)), subject: "201", title: "Captivating", rating: N }
), ),
srv.create ('Reviews') .entries ( srv.create ('Reviews') .entries (
{ ID: 111 + (++N), subject: "201", title: "Captivating", rating: N } { ID: String(111 + (++N)), subject: "201", title: "Captivating", rating: N }
), ),
srv.create ('Reviews') .entries ( srv.create ('Reviews') .entries (
{ ID: 111 + (++N), subject: "201", title: "Captivating", rating: N } { ID: String(111 + (++N)), subject: "201", title: "Captivating", rating: N }
), ),
srv.create ('Reviews') .entries ( srv.create ('Reviews') .entries (
{ ID: 111 + (++N), subject: "201", title: "Captivating", rating: N } { ID: String(111 + (++N)), subject: "201", title: "Captivating", rating: N }
), ),
])) ]))