- Adjusted to take advantage of EmacSQL v4.1.0.
- Dropped support for Emacs 25. 22f67f5
- Database classes no longer derive from a connector class. c3b34a6
- Added two new generic functions
closql-dref
andclosql-dset
, which are used by our advices toeieio-oref
andeieio-oset
, when they deal with slots whose values aren’t completely stored in the object’s primary table. This makes it possible to implement slot-specific behavior. 296a356, 27aa7e5 - Originally the
:closql-table
slot property was used for slots that involved the use of two tables, but later it was additionally abused for slots that involve three tables. Now such slots use a new slot property,:closql-tables
. The values of these slots can now be accessed usingoref,
and the old hackclosql--iref
has been removed. - The value of
:closql-tables
slots now begin with the id. dae0256 - Accessing the value of indirect slots is much faster now, and the value is cached, making repeated slot access even faster. 09ad40f, dc8cacb
- Refreshed metadata.
- By default
closql-get
no longer proactively resolves all slots, which is never actually unnecessary but often extremely expensive.
- Added support for alternative database connectors.
The
closql-database
class is abstract now, making it necessary to define a class that derives from that and also from a connector class.
- Adjusted to how unbound slots are represented in Emacs 28.
- Cosmetics.
- Added new functions
closql--db-get
andclosql--db-set
.
- When any class is autoloaded, then that could still caused a recursive load.
- When any class is autoloaded, then that caused a recursive load.
- Adjusted to incompatibles changes to Eieio internals that broke some code that relied on implementation details.
- Added optional
replace
argument toclosql-insert
. It non-nil, then this function usesINSERT OR REPLACE INTO
instead of justINSERT INTO
, allowing the caller to replace an existing row. - Added function
closql-reload
, which, given a potentially outdated object, returns an up-to-date object. - Replaced the slot property
:closql-columns
with:closql-table
. The value has to be a table instead of a vector of columns and its name can be different from that of the slot, which previously was not possible. The slots are now determined by querying the database. - Added new experimental function
closql--iref
.
- Added new
closql-object
class slotclosql-order-by
, which allows specify how the values of a related:closql-class
slot are ordered. - An initially unbound slot for which neither
:closql-class
nor:closql-columns
is set caused an error inclosql--resolve-slots
.
- Fixed a bug that caused
closql-insert
to fail when using Emacs 25 ever since Emacs 26 is supported too. - Added new utility function
closql-format
.
- A recent change on Emacs 27.0.50 causes an EmacSQL bug to surface. That was fixed upstream and the dependency was bumped to bring in that fix.
- Emacs 26.1 will use a new
record
type instead of vectors. Closql can now deal with both internal representations.
- The value of a slot can now be a list of objects. Like for a slot
whose value is a list of lists, the elements have to be uniform, in
this case they have to share a base-class, and they are unordered.
Objects in such secondary tables can be queried directly, using the same functions that are used to query objects in the primary table. For secondary tables the new optional
class
argument of these query functions has to be provided.Note that
oset
currently does not support “list of objects” slots. - Access information is now stored in slots of the object base class
instead of in the database class. This change was necessary to
allow storing objects of different types in different tables.
The names of all of these slots are prefixed with
closql-
. The existing slotdatabase
was renamed toclosql-database
and the slot property:columns
was renamed to:closql-columns
. - Class tags are now automatically abbreviated when being stored in
the database because that gives friendlier results when querying it
direct.
It was already possible to do that before by implementing the generic functions
closql--class-to-sql
andclosql--sql-to-class
. These functions were replaced by the functionsclosql--abbrev-class
andclosql--expand-abbrev
, which have different signatures and allow subclasses to strip a common prefix and/or suffix by setting the object slotsclosql-class-prefix
andclosql-class-suffix
instead of having to define methods for these subclasses. - Added new functions
closql-query
. It calls eitherclosql-entries
or if itsselect
argument is non-nilclosql-select
. Ifselect
is a symbol, then return a list of elements, unlikeclosql-select
, which would return a list of lists with one element each. - The function
closql--where-class-in
isn’t merely intended for internal use anymore and was renamed toclosql-where-in-class
. - Added new internal function
closql--list-subbrevs
. - The internal function
closql--oref-default
was removed. - The function signature of
closql--remake-instance
changed.
- Repository moved to https://github.com/emacscollective/closql.
- Update links.
- Fixed updating of rows in secondary tables when the key is
nil
.
- Setting the value of a slot whose value is stored in a secondary table no longer deletes and recreates all rows.
closql--db-init
no longer sets the primary key of secondary tables.
- Text properties are now being removed when storing string in the database.
- Initial public alpha release.