Which part of SQLalchemy's dialect is responsible for pre-processing queries?

感情迁移 提交于 2019-12-13 02:59:12

问题


Apache Superset has some kind of quirk, where any temporal query is sent with datetimes, even when the respective columns are mere dates.

To work around it, I wanted to add some preprocessing to any passing query, so that datetimes are swapped by dates if the respective columns require it.

Any insight I gained about writing the dialect came by comparing ready-made code, which is often repeatable, as other writers seem to encounter the same problem. I haven't so far found anything tangible to shed light on this particular issue.

Has someone perhaps managed to overcome a similar obstacle, and can point me to the relevant SQLalcemy construct / function that I should implement or add to to allow this preprocessing?

Much appreciation.

来源:https://stackoverflow.com/questions/46027152/which-part-of-sqlalchemys-dialect-is-responsible-for-pre-processing-queries

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!