aiida-core icon indicating copy to clipboard operation
aiida-core copied to clipboard

Docs: Where/how to document the backend key-alias mapping feature introduces in #6245

Open edan-bainglass opened this issue 3 months ago • 0 comments

#6245 introduced a key-alias mapping in the backend for various QueryBuilder keys.

https://github.com/aiidateam/aiida-core/blob/8ac6424108d1528bd3279c81da62dd44855b6ebc/src/aiida/storage/psql_dos/orm/querybuilder/main.py#L42-L70

This takes care of all known aliasing required for the postgresql backend, leaving the key aliasing mechanism available strictly for new data types (for plugin developers). Note that currently the map is in the postgresql backend, but the idea is that all backends should implement a similar mapping, with their respective aliases, so the frontend remains as is. With the map in place. users may now use the frontend keys in the QueryBuilder, so for example, use pk, not id (though still valid).

With that in mind, I propose we update the codebase (and documentation) accordingly w.r.t this mapping to promote the use of the frontend keys only, i.e. no mentions of id (for example).

edan-bainglass avatar Mar 20 '24 06:03 edan-bainglass