Make sqlite-mode-list-tables work on older sqlite versions

* lisp/sqlite-mode.el (sqlite-mode-list-tables): Use sqlite_master
instead of sqlite_schema, since the former name is the historical
name and is available in all sqlite3 versions:
https://sqlite.org/schematab.html
This commit is contained in:
Lars Ingebrigtsen 2021-12-12 05:41:07 +01:00
parent ff9360f4da
commit 6656a4d161

View file

@ -57,7 +57,7 @@
(db sqlite--db)
(entries nil))
(erase-buffer)
(dolist (table (sqlite-select db "select name from sqlite_schema where type = 'table' and name not like 'sqlite_%' order by name"))
(dolist (table (sqlite-select db "select name from sqlite_master where type = 'table' and name not like 'sqlite_%' order by name"))
(push (list (car table)
(caar (sqlite-select db (format "select count(*) from %s"
(car table)))))