From 74c136f8334b6972ae55dd8ee0ade09ef8ae3282 Mon Sep 17 00:00:00 2001 From: Fabio Di Stasio Date: Thu, 27 Apr 2023 14:14:04 +0200 Subject: [PATCH] fix: unable to delete rows with null values and no primary key --- src/main/ipc-handlers/tables.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/ipc-handlers/tables.ts b/src/main/ipc-handlers/tables.ts index 82399a27..1c8adbeb 100644 --- a/src/main/ipc-handlers/tables.ts +++ b/src/main/ipc-handlers/tables.ts @@ -247,7 +247,10 @@ export default (connections: {[key: string]: antares.Client}) => { if (typeof row[key] === 'string') row[key] = `'${row[key]}'`; - row[key] = `= ${row[key]}`; + if (row[key] === null) + row[key] = 'IS NULL'; + else + row[key] = `= ${row[key]}`; } await connections[params.uid]