diff options
author | Wolfgang Müller | 2021-05-05 17:19:22 +0200 |
---|---|---|
committer | Wolfgang Müller | 2021-05-05 17:19:22 +0200 |
commit | 517458eeb9c7e1f3c41d8071978e48bc9822a1b2 (patch) | |
tree | 8ddb696813487ae070097006618b9842c4acc7dd /LICENSE | |
parent | f67f0f93e1c90eb778a51016c9777c9f7dae7839 (diff) | |
download | quarg-517458eeb9c7e1f3c41d8071978e48bc9822a1b2.tar.gz |
tables: Correctly handle Integer timestamps from the SQLite backend
Quassel stores its timestamps as INTEGERs when using the SQLite backend. Since
SQLAlchemy expects strings here instead[1], we have to handle this manually.
This commit extends the existing process_result_value() function to handle a
conversion from a unix timestamp to a proper datetime object, makes sure that
the right impl is chosen for both SQLite and PostgreSQL, and adds the
process_bind_param() function which takes care of the conversion back to a unix
timestamp when binding values for SELECT statements.
[1] https://docs.sqlalchemy.org/en/14/core/type_basics.html#sqlalchemy.types.DateTime
Diffstat (limited to 'LICENSE')
0 files changed, 0 insertions, 0 deletions