summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2021-12-13 06:08:09 +0100
committerLars Ingebrigtsen <larsi@gnus.org>2021-12-13 06:08:09 +0100
commit9ce0fe5ef4d6e9c3dcd69237e0b5bb3fd46ee7da (patch)
treef7fa90b7e601558dc3caa0bb1c46deb88b199b2d /doc
parentc86b86f9a9ee3c42aed9ede794e8c3e19ce35ec5 (diff)
downloademacs-9ce0fe5ef4d6e9c3dcd69237e0b5bb3fd46ee7da.tar.gz
Add a new `sqlite-pragma' command
* doc/lispref/text.texi (Database): Document it. * src/sqlite.c (Fsqlite_pragma): Add a separate command for pragmas. These can be done via sqlite-execute, but it's less confusing to have them in a separate command.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/text.texi15
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index b8d92f7fdca..5ab5e5715f0 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -5286,6 +5286,21 @@ Like @code{progn} (@pxref{Sequencing}), but executes @var{body} with a
transaction held, and commits the transaction at the end.
@end defmac
+@defun sqlite-pragma db pragma
+Execute @var{pragma} in @var{db}. A @dfn{pragma} is usually a command
+that affects the database overall, instead of any particular table.
+For instance, to make SQLite automatically garbage collect data that's
+no longer needed, you can say:
+
+@lisp
+(sqlite-pragma db "auto_vacuum = FULL")
+@end lisp
+
+This function returns non-@code{nil} on success and @code{nil} if the
+pragma failed. Many pragmas can only be issued when the database is
+brand new and empty.
+@end defun
+
@defun sqlite-load-extension db module
Load the named extension @var{module} into the database @var{db}.
Extensions are usually shared-library files; on GNU and Unix systems,