MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / bitwise_not

Function bitwise_not

lib/sqlalchemy/sql/_elements_constructors.py:1224–1240  ·  view source on GitHub ↗

Produce a unary bitwise NOT clause, typically via the ``~`` operator. Not to be confused with boolean negation :func:`_sql.not_`. .. versionadded:: 2.0.2 .. seealso:: :ref:`operators_bitwise`

(expr: _ColumnExpressionArgument[_T])

Source from the content-addressed store, hash-verified

1222
1223
1224def bitwise_not(expr: _ColumnExpressionArgument[_T]) -> UnaryExpression[_T]:
1225 """Produce a unary bitwise NOT clause, typically via the ``~`` operator.
1226
1227 Not to be confused with boolean negation :func:`_sql.not_`.
1228
1229 .. versionadded:: 2.0.2
1230
1231 .. seealso::
1232
1233 :ref:`operators_bitwise`
1234
1235
1236 """
1237 if isinstance(expr, operators.ColumnOperators):
1238 return expr.bitwise_not()
1239 else:
1240 return UnaryExpression._create_bitwise_not(expr)
1241
1242
1243def extract(field: str, expr: _ColumnExpressionArgument[Any]) -> Extract:

Callers

nothing calls this directly

Calls 2

_create_bitwise_notMethod · 0.80
bitwise_notMethod · 0.45

Tested by

no test coverage detected