MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _between_impl

Function _between_impl

lib/sqlalchemy/sql/default_comparator.py:316–350  ·  view source on GitHub ↗

See :meth:`.ColumnOperators.between`.

(
    expr: ColumnElement[Any],
    op: OperatorType,
    cleft: Any,
    cright: Any,
    **kw: Any,
)

Source from the content-addressed store, hash-verified

314
315
316def _between_impl(
317 expr: ColumnElement[Any],
318 op: OperatorType,
319 cleft: Any,
320 cright: Any,
321 **kw: Any,
322) -> ColumnElement[Any]:
323 """See :meth:`.ColumnOperators.between`."""
324 return BinaryExpression(
325 expr,
326 ExpressionClauseList._construct_for_list(
327 operators.and_,
328 type_api.NULLTYPE,
329 coercions.expect(
330 roles.BinaryElementRole,
331 cleft,
332 expr=expr,
333 operator=operators.and_,
334 ),
335 coercions.expect(
336 roles.BinaryElementRole,
337 cright,
338 expr=expr,
339 operator=operators.and_,
340 ),
341 group=False,
342 ),
343 op,
344 negate=(
345 operators.not_between_op
346 if op is operators.between_op
347 else operators.between_op
348 ),
349 modifiers=kw,
350 )
351
352
353def _pow_impl(

Callers

nothing calls this directly

Calls 2

BinaryExpressionClass · 0.85
_construct_for_listMethod · 0.80

Tested by

no test coverage detected