From c9b64e3591278fec844c601a5d56c86e5bd3c107 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Wed, 11 Sep 2024 13:41:54 +0100 Subject: [PATCH] SQLite uses CTE with SQS 2.1.1. --- packages/backend-core/src/sql/sql.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/backend-core/src/sql/sql.ts b/packages/backend-core/src/sql/sql.ts index 6757bf8f50..2b5243f856 100644 --- a/packages/backend-core/src/sql/sql.ts +++ b/packages/backend-core/src/sql/sql.ts @@ -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