From e84a6a44f4a6cb19df2b3a28e02002bee503417c Mon Sep 17 00:00:00 2001 From: Charlie Kolb Date: Thu, 16 Oct 2025 18:02:05 +0200 Subject: [PATCH] attempt a fix --- .../modules/data-table/data-table-rows.repository.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/cli/src/modules/data-table/data-table-rows.repository.ts b/packages/cli/src/modules/data-table/data-table-rows.repository.ts index b60df1fac60..48a37b6b939 100644 --- a/packages/cli/src/modules/data-table/data-table-rows.repository.ts +++ b/packages/cli/src/modules/data-table/data-table-rows.repository.ts @@ -50,8 +50,7 @@ function resolvePath( if (path) { const pathArray = parsePath(path); if (dbType === 'postgres') { - const args = [ref, ...pathArray]; - const base = toPostgresPath(args); + const base = `${ref}->${toPostgresPath(pathArray)}`; if (typeof value === 'number') { return `(${base})::numeric`; } @@ -65,8 +64,9 @@ function resolvePath( // by converting to text by default we end up with `true` for an equals NULL check // both for cases where the key exists and is literally NULL and where it doesn't exist return `(${base})::text`; - } - if (dbType === 'sqlite') { + } else { + // maybe it just works for MariaDB and MySQL lol + // if (dbType === 'sqlite' || dbType === 'sqlite-pooled') { const path = toSQLitePath(pathArray); const base = `json_extract(${ref}, '${path.replaceAll("'", "\\'")}')`; if (typeof value === 'number') { @@ -83,7 +83,7 @@ function resolvePath( } return base; } - return; + return ref; } return ref; }