【发布时间】:2013-12-10 13:21:04
【问题描述】:
SA 支持正则表达式,但那些似乎是 Python 正则表达式 (Regular expressions in SQLalchemy queries?)
我需要使用正则表达式来匹配某些行(一行包含 1 个日志行,因此正则表达式是自然匹配),但出于性能原因,我更喜欢使用 PG 后端,例如 this question:
select * from table where name ~ 'foo';
如何在一个查询中结合 PG 实现的正则表达式和 SQLAlchemy 对象选择?
【问题讨论】:
标签: python regex postgresql sqlalchemy