MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _regexp_replace_impl

Function _regexp_replace_impl

lib/sqlalchemy/sql/default_comparator.py:393–422  ·  view source on GitHub ↗
(
    expr: ColumnElement[Any],
    op: OperatorType,
    pattern: Any,
    replacement: Any,
    flags: Optional[str],
    **kw: Any,
)

Source from the content-addressed store, hash-verified

391
392
393def _regexp_replace_impl(
394 expr: ColumnElement[Any],
395 op: OperatorType,
396 pattern: Any,
397 replacement: Any,
398 flags: Optional[str],
399 **kw: Any,
400) -> ColumnElement[Any]:
401 return BinaryExpression(
402 expr,
403 ExpressionClauseList._construct_for_list(
404 operators.comma_op,
405 type_api.NULLTYPE,
406 coercions.expect(
407 roles.BinaryElementRole,
408 pattern,
409 expr=expr,
410 operator=operators.comma_op,
411 ),
412 coercions.expect(
413 roles.BinaryElementRole,
414 replacement,
415 expr=expr,
416 operator=operators.comma_op,
417 ),
418 group=False,
419 ),
420 op,
421 modifiers={"flags": flags},
422 )
423
424
425operator_lookup: util.immutabledict[

Callers

nothing calls this directly

Calls 2

BinaryExpressionClass · 0.85
_construct_for_listMethod · 0.80

Tested by

no test coverage detected