From: Yue Yi Date: Mon, 14 Jul 2025 05:57:19 +0000 (+0800) Subject: Fix 'sqlite-mode-delete' with NULL field values X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=81ae38b9d9224cab067a19eefdfe57e9f4e7fefd;p=emacs.git Fix 'sqlite-mode-delete' with NULL field values * lisp/sqlite-mode.el (sqlite-mode-delete): Support NULL field values (bug#79011). (cherry picked from commit 9153f1f3bb5c86878bedc0be6f5a1cd60a0e88f4) --- diff --git a/lisp/sqlite-mode.el b/lisp/sqlite-mode.el index a4b96b02b48..82d5cc80a2c 100644 --- a/lisp/sqlite-mode.el +++ b/lisp/sqlite-mode.el @@ -204,9 +204,12 @@ (format "delete from \"%s\" where %s" (cdr table) (string-join - (mapcar (lambda (column) - (format "\"%s\" = ?" (car (split-string column " ")))) - (cons "rowid" (sqlite-mode--column-names (cdr table)))) + (cl-mapcar (lambda (column value) + (format "\"%s\" %s ?" + (car (split-string column " ")) + (if value "=" "is"))) + (cons "rowid" (sqlite-mode--column-names (cdr table))) + row) " and ")) row) (delete-region (line-beginning-position) (progn (forward-line 1) (point)))))