You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
4.0.0 was released on 2024-08-08. It added two new SQLite back-ends, emacsql-sqlite-builtin and emacsql-sqlite-module.
The upcoming 4.1.0 release removes the legacy emacsql-sqlite back-end, which used our own custom SQLite binary. Using an external process like this is must slower and less reliable than using the new back-ends, which use the new built-in SQLite support in Emacs 29.1 or the module provided by the third-party sqlite3 package.
When I first announced my plans for 4.0.0 in #113, 18 months ago, I asked package authors to start using the emacsql-sqlite-open function, instead of hard-coding which SQlite is used or providing their own mechanism for picking a back-end.
If you haven't done that yet, then you have to do so now. The old emacsql-sqlite back-end has already been removed from EmacSQL's main branch, and if you are still using that explicitly, your package is now broken. But even if your package uses one of the new back-ends by default, you should make sure users do not have the option to pick the now removed emacsql-sqlite back-end or one of the old inferior third-party back-ends, which are also not supported anymore.
I have just added a new emacsql-sqlite-connection function to further reduce the required boilerplate. Most packages should now only need:
(require'emacsql-sqlite)
(defvarmy-database-file"/tmp/foo2/my.db")
(defvarmy-database-connectionnil)
(defunmy-db--init (connection)
(emacsql connection [:create-table people ([name id salary])]))
(defunmy-db ()
(emacsql-sqlite-connection 'my-database-connection my-database-file
#'my-db--init))
After that you can use (emacsql (my-db) [...] ...). You might want to reduce the required typing to just (my-sql [...] ...), by adding:
If your package uses more than a single database, then you have to use emacsql-sqlite-open. But look at emacsql-sqlite-connection anyway; most likely you can just copy that and make some minor adjustments.
To be able to use emacsql-sqlite-open or emacsql-sqlite-connection, you have to (require 'emacsql-sqlite).
If your package currently does (require 'emacsql-sqlite-common), that will continue to work but only for another release or two. That library does nothing now but (require emacs-sqlite), so please change that as soon as 4.1.0 is released.
The text was updated successfully, but these errors were encountered:
4.0.0
was released on 2024-08-08. It added two new SQLite back-ends,emacsql-sqlite-builtin
andemacsql-sqlite-module
.The upcoming
4.1.0
release removes the legacyemacsql-sqlite
back-end, which used our own custom SQLite binary. Using an external process like this is must slower and less reliable than using the new back-ends, which use the new built-in SQLite support in Emacs 29.1 or the module provided by the third-partysqlite3
package.When I first announced my plans for
4.0.0
in #113, 18 months ago, I asked package authors to start using theemacsql-sqlite-open
function, instead of hard-coding which SQlite is used or providing their own mechanism for picking a back-end.If you haven't done that yet, then you have to do so now. The old
emacsql-sqlite
back-end has already been removed from EmacSQL'smain
branch, and if you are still using that explicitly, your package is now broken. But even if your package uses one of the new back-ends by default, you should make sure users do not have the option to pick the now removedemacsql-sqlite
back-end or one of the old inferior third-party back-ends, which are also not supported anymore.I have just added a new
emacsql-sqlite-connection
function to further reduce the required boilerplate. Most packages should now only need:After that you can use
(emacsql (my-db) [...] ...)
. You might want to reduce the required typing to just(my-sql [...] ...)
, by adding:If your package uses more than a single database, then you have to use
emacsql-sqlite-open
. But look atemacsql-sqlite-connection
anyway; most likely you can just copy that and make some minor adjustments.To be able to use
emacsql-sqlite-open
oremacsql-sqlite-connection
, you have to(require 'emacsql-sqlite)
.If your package currently does
(require 'emacsql-sqlite-common)
, that will continue to work but only for another release or two. That library does nothing now but(require emacs-sqlite)
, so please change that as soon as4.1.0
is released.The text was updated successfully, but these errors were encountered: