emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/emacsql 44b4f89407 2/6: emacsql-sqlite-open: Enable foreig


From: ELPA Syncer
Subject: [nongnu] elpa/emacsql 44b4f89407 2/6: emacsql-sqlite-open: Enable foreign key constrains
Date: Sun, 17 Nov 2024 18:59:36 -0500 (EST)

branch: elpa/emacsql
commit 44b4f89407ca12c24a8ce304f762c55b95775074
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    emacsql-sqlite-open: Enable foreign key constrains
---
 emacsql-sqlite.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/emacsql-sqlite.el b/emacsql-sqlite.el
index ece611bdf0..1b56d5c0eb 100644
--- a/emacsql-sqlite.el
+++ b/emacsql-sqlite.el
@@ -105,11 +105,12 @@ Automatically use the best available back-end, as 
returned by
 
 If FILE is nil, use an in-memory database.  If optional DEBUG is
 non-nil, log all SQLite commands to a log buffer, for debugging
-purposes."
+purposes.  Always enable support for foreign key constrains."
   (let* ((class (emacsql-sqlite-default-connection))
          (connection (make-instance class :file file)))
     (when debug
       (emacsql-enable-debugging connection))
+    (emacsql connection [:pragma (= foreign-keys on)])
     connection))
 
 (defun emacsql-sqlite-default-connection ()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]