I've considered manual queries and building classes by myself. This option
is good in terms of performance, but it requires a lot of code duplication
and kills code reuse. So I want to use the same mapper classes for both
read and modify operations. Also, I want to have the same query
On Fri, Oct 11, 2019, at 5:23 AM, Александр Егоров wrote:
> Thank you very much for your answers!
>
> Some more questions
> 1) I see you use sa.inspect(self).dict in __getstate__. Is it safe to replace
> it with self.__dict__? I didn't find any difference in the result, but
> __dict__ works
Thank you very much for your answers!
Some more questions
1) I see you use sa.inspect(self).dict in __getstate__. Is it safe to
replace it with self.__dict__? I didn't find any difference in the result,
but __dict__ works 30 times faster.
2) I'm going to implement __getstate__ and __setstate__
On Thu, Oct 10, 2019, at 2:48 AM, Александр Егоров wrote:
> Hello!
>
> I want to cache query results in a distributed cache (Redis), so I need to
> serialize/deserialize fetched entities very fast.
> However, it turned that SQLAlchemy entities are very heavy for pickle to
> dump/load. Regular