Revision 319de05d5fbebbebb47532209490a2f8380f5343 authored by Valentin Lorentz on 10 August 2020, 19:33:00 UTC, committed by Valentin Lorentz on 10 August 2020, 19:48:37 UTC
Before this commit, python-cassandra used the default row factory, which creates anonymous named tuple on each query, which makes it impossible to type CqlRunner properly. This commit replaces the row factory with dict_factory, which creates only dicts, and converts them to well-defined dataclasses. Additionally, this stop leaking python-cassandra internals to cassandra.storage. This also has some great side-effects: * methods of CqlRunner are now consistent with each other (eg. _add_one methods used to be a mix of objects, dictionaries, and taking each value as argument) * it will allow me to deduplicate more codes in further commits (I already deduplicated insertions methods to use self._add_one, as it was meant on the initial write of this class) * CqlRunner no longer needs to define lists with column names, they are automatically detected from the dataclasses
1 parent 7d332f5
requirements-swh.txt
swh.core[db,http] >= 0.2.0
swh.model >= 0.6.6
swh.objstorage >= 0.0.40
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...