Skip to content

Upcoming breaking changes #8

Closed
Closed
@tarsius

Description

@tarsius

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 or closql--db-init. You might be able to use the default implementation for some of them. Anything but the call to closql-db should probably be remove from NAME-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 a emacsql-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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions