From 46b3b8aaeced275b03cf0ae54557272a059d6f20 Mon Sep 17 00:00:00 2001 From: d045778 Date: Wed, 6 May 2020 11:52:30 +0200 Subject: [PATCH] add test for subselect in query api as documented --- test/cds.ql.test.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/cds.ql.test.js b/test/cds.ql.test.js index 71f635e0..246b31b2 100644 --- a/test/cds.ql.test.js +++ b/test/cds.ql.test.js @@ -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`,