Return a :class:`.False_` construct. E.g.: .. sourcecode:: pycon+sql >>> from sqlalchemy import false >>> print(select(t.c.x).where(false())) {printsql}SELECT x FROM t WHERE false A backend which does not support true/false constants will render as an expr
()
| 1221 | |
| 1222 | |
| 1223 | def false() -> False_: |
| 1224 | """Return a :class:`.False_` construct. |
| 1225 | |
| 1226 | E.g.: |
| 1227 | |
| 1228 | .. sourcecode:: pycon+sql |
| 1229 | |
| 1230 | >>> from sqlalchemy import false |
| 1231 | >>> print(select(t.c.x).where(false())) |
| 1232 | {printsql}SELECT x FROM t WHERE false |
| 1233 | |
| 1234 | A backend which does not support true/false constants will render as |
| 1235 | an expression against 1 or 0: |
| 1236 | |
| 1237 | .. sourcecode:: pycon+sql |
| 1238 | |
| 1239 | >>> print(select(t.c.x).where(false())) |
| 1240 | {printsql}SELECT x FROM t WHERE 0 = 1 |
| 1241 | |
| 1242 | The :func:`.true` and :func:`.false` constants also feature |
| 1243 | "short circuit" operation within an :func:`.and_` or :func:`.or_` |
| 1244 | conjunction: |
| 1245 | |
| 1246 | .. sourcecode:: pycon+sql |
| 1247 | |
| 1248 | >>> print(select(t.c.x).where(or_(t.c.x > 5, true()))) |
| 1249 | {printsql}SELECT x FROM t WHERE true{stop} |
| 1250 | |
| 1251 | >>> print(select(t.c.x).where(and_(t.c.x > 5, false()))) |
| 1252 | {printsql}SELECT x FROM t WHERE false{stop} |
| 1253 | |
| 1254 | .. seealso:: |
| 1255 | |
| 1256 | :func:`.true` |
| 1257 | |
| 1258 | """ |
| 1259 | |
| 1260 | return False_._instance() |
| 1261 | |
| 1262 | |
| 1263 | def funcfilter( |