Merge pull request #73 from SAP-samples/add-test-for-subselect

add test for subselect in query api as documented
This commit is contained in:
Heiko Witteborg
2020-05-06 13:03:50 +02:00
committed by GitHub

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`,