neosqlite.collection.expr_evaluator.sql_converters.string module

SQL converters for string operators.

Known, documented divergences from MongoDB in the SQL tier (the Python tier is authoritative): - lower()/upper() fold ASCII only; MongoDB folds Unicode. - $concat silently coerces booleans to ‘0’/’1’ text; MongoDB errors. - Legacy $substr with negative length follows SQLite substr semantics.

All other operators match MongoDB semantics, including byte-accurate $substrBytes and empty-find $replaceAll (#117).

class neosqlite.collection.expr_evaluator.sql_converters.string.StringMixin[source]

Bases: BaseSqlMixin

$concat / $toLower / $toUpper / $substr / $trim / $regexMatch / $replaceAll → SQL.

_build_pattern_with_options(regex: str, options: str) str[source]

Build regex pattern with inline flags.

_convert_string_operator(operator: str, operands: list[Any]) tuple[str, list[Any]][source]

Convert string operators to SQL.