Skip to content

Commit 8d8a787

Browse files
Now wrapping all subqueries within WITH
1 parent c4985fe commit 8d8a787

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "clickhouse-query",
3-
"version": "1.7.3",
3+
"version": "1.7.4",
44
"description": "ClickHouse Query is intuitive query builder to overcome the complexity of ClickHouse SQL syntax.",
55
"main": "dist/src/index.js",
66
"types": "dist/src/index.d.ts",

src/Query.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ export class Query extends FilterableQuery {
210210
if (hasInnerWithStatement) {
211211
preparedWithPart = `WITH ${(alias ? `${alias} AS` : '')} (${withPart.generateSql()})`;
212212
} else {
213-
preparedWithPart = `WITH ${(alias ? `${alias} AS` : '')} ${withPart.generateSql()}`;
213+
preparedWithPart = `WITH ${(alias ? `${alias} AS` : '')} (${withPart.generateSql()})`;
214214
}
215215
}
216216
sql = `${preparedWithPart} ${sql}`;

0 commit comments

Comments
 (0)