Description
I am getting ready to release EmacSQL at the end of the month. For packages that use that directly, the update is trivial, see magit/emacsql#113.
@wandersoncferreira @r0man, your packages also use closql
, and here we cannot get around a breaking change.
Packages that use EmacSQL should not force the user to use the emacsql-sqlite
backend, and they should even automatically pick the best backend. Letting users use another backend was more complicated (and ugly) when using closql
and I have decided to fix that.
That is a breaking change and you will have to make adjustments. Please do that soon, until you have done so, I cannot publish the updated closql
and also won't be able to push the respective changes to forge
and epkg
. I would like to do so soon, so that a few weeks can pass between now and the next releases of emacsql
and closql
, so that any issue that might exist has time to bubble up before then.
The change in closql is 4638ee1.
To learn what sort of change you have to make to your package, have a look at the respective commits in forge
and epkg
. You can find them in the next
branches. As you can see, things get simpler.
- Drop the backend option.
- Set the class slots of
NAME-database
. - There are now three generic methods to setup and update database, replacing code previously in
NAME-db
orclosql--db-init
. You might be able to use the default implementation for some of them. Anything but the call toclosql-db
should probably be remove fromNAME-db
. - Several generic functions got a
closql-database
method. (But I haven't done it for all such functions.) Previously that wasn't necessary because a packages derived class also derived from aemacsql-sqlite*
class. emacsql-with-connection
is a macro not a generic function, so I had to provide a substitute under a new name:closql-with-connection
.