1
0
Fork 0
mirror of synced 2024-09-18 02:08:34 +12:00

SQLite uses CTE with SQS 2.1.1.

This commit is contained in:
mike12345567 2024-09-11 13:41:54 +01:00
parent 05de673781
commit c9b64e3591

View file

@ -1212,12 +1212,8 @@ class InternalBuilder {
query = this.addFilters(query, filters, { relationship: true })
// SQLite (SQS) cannot use the WITH statement yet
if (relationships?.length && this.client === SqlClient.SQL_LITE) {
return this.addJsonRelationships(query, tableName, relationships)
}
// handle relationships with a CTE for all others
else if (relationships?.length) {
if (relationships?.length) {
const mainTable =
this.query.tableAliases?.[this.query.endpoint.entityId] ||
this.query.endpoint.entityId