MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / _get_regex

Function _get_regex

bson/__init__.py:461–468  ·  view source on GitHub ↗

Decode a BSON regex to bson.regex.Regex or a python pattern object.

(
    data: Any, view: Any, position: int, dummy0: Any, opts: CodecOptions[Any], dummy1: Any
)

Source from the content-addressed store, hash-verified

459
460
461def _get_regex(
462 data: Any, view: Any, position: int, dummy0: Any, opts: CodecOptions[Any], dummy1: Any
463) -> Tuple[Regex[Any], int]:
464 """Decode a BSON regex to bson.regex.Regex or a python pattern object."""
465 pattern, position = _get_c_string(data, view, position, opts)
466 bson_flags, position = _get_c_string(data, view, position, opts)
467 bson_re = Regex(pattern, bson_flags)
468 return bson_re, position
469
470
471def _get_ref(

Callers

nothing calls this directly

Calls 2

RegexClass · 0.90
_get_c_stringFunction · 0.85

Tested by

no test coverage detected