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
()
| 1286 | |
| 1287 | |
| 1288 | def false() -> False_: |
| 1289 | """Return a :class:`.False_` construct. |
| 1290 | |
| 1291 | E.g.: |
| 1292 | |
| 1293 | .. sourcecode:: pycon+sql |
| 1294 | |
| 1295 | >>> from sqlalchemy import false |
| 1296 | >>> print(select(t.c.x).where(false())) |
| 1297 | {printsql}SELECT x FROM t WHERE false |
| 1298 | |
| 1299 | A backend which does not support true/false constants will render as |
| 1300 | an expression against 1 or 0: |
| 1301 | |
| 1302 | .. sourcecode:: pycon+sql |
| 1303 | |
| 1304 | >>> print(select(t.c.x).where(false())) |
| 1305 | {printsql}SELECT x FROM t WHERE 0 = 1 |
| 1306 | |
| 1307 | The :func:`.true` and :func:`.false` constants also feature |
| 1308 | "short circuit" operation within an :func:`.and_` or :func:`.or_` |
| 1309 | conjunction: |
| 1310 | |
| 1311 | .. sourcecode:: pycon+sql |
| 1312 | |
| 1313 | >>> print(select(t.c.x).where(or_(t.c.x > 5, true()))) |
| 1314 | {printsql}SELECT x FROM t WHERE true{stop} |
| 1315 | |
| 1316 | >>> print(select(t.c.x).where(and_(t.c.x > 5, false()))) |
| 1317 | {printsql}SELECT x FROM t WHERE false{stop} |
| 1318 | |
| 1319 | .. seealso:: |
| 1320 | |
| 1321 | :func:`.true` |
| 1322 | |
| 1323 | """ |
| 1324 | |
| 1325 | return False_._instance() |
| 1326 | |
| 1327 | |
| 1328 | def funcfilter( |