fix(feat): fix query parsing

This commit is contained in:
dmitry.berezhnov
2022-01-26 00:22:52 +03:00
parent a84d890a1d
commit 8ccc02d54f
4 changed files with 44 additions and 35 deletions

View File

@@ -937,6 +937,15 @@ describe('Select and WITH TOTALS statement', () => {
expect(result.rows).to.be(LIMIT_COUNT);
expect(result).to.have.key('statistics');
});
it('start with WITH', async() => {
const r = await clickhouse.query(`
WITH x as (SELECT 1) SELECT * FROM x
`).toPromise();
expect(r).to.be.ok();
expect(r[0]).to.be.eql({1: 1});
});
});
describe('Abort query', () => {