add test for subselect in query api as documented

This commit is contained in:
d045778
2020-05-06 11:52:30 +02:00
parent 59f5c82684
commit 46b3b8aaec

View File

@@ -359,6 +359,11 @@ describe('cds.ql → cqn', () => {
CQL`SELECT from Foo where x in (SELECT y from Bar)`
)
// using query api
expect(SELECT.from('Books').where(
`author.name in`, SELECT('name').from('Authors'))).to.eql(CQL`SELECT from Books where author.name in (SELECT name from Authors)`
)
// in classical semi joins
expect(
SELECT('x').from(Foo) .where ( `exists`,