![]() | 1 wb14123 2018-01-01 10:04:54 +08:00 对,这样是不生效的。可以 filter(a==a, b==b) 或 filter(and_(a==a, b==b)) |
![]() | 2 wb14123 2018-01-01 10:05:22 +08:00 其实自己试试就知道了 |
![]() | 3 Kylin30 OP 学习了,以前用了 and 没报错我以为没问题呢,现在看来要改一下了 |
4 siteshen 2018-01-01 10:26:24 +08:00 我一般是简单的用 filter_by,filter_by 处理不了的用 filter。至于结果如何,可以配置日志看看生成的 SQL 语句。 http://docs.sqlalchemy.org/en/latest/core/engines.html#configuring-logging 另 @wb14123 我们似曾相识? |
![]() | 7 wwqgtxx 2018-01-01 15:23:05 +08:00 via iPhone 因为 python 不允许重载 and 运算符,所以只能曲线救国了 |