neosqlite.collection.expr_evaluator.sql_converters.type_converters module

SQL converters for type converters operators.

class neosqlite.collection.expr_evaluator.sql_converters.type_converters.TypeConvertersMixin[source]

Bases: BaseSqlMixin

$toString / $toInt / $toBool / $type / $isNumber / $convert → SQL.

_get_operator_return_type(operator: str) str | None[source]

Infer the BSON return type of a MongoDB operator.

Returns:

BSON type name (e.g., ‘number’, ‘bool’, ‘string’, ‘array’, ‘object’) or None if the return type is ambiguous or unknown.

_get_literal_bson_type(value: Any) str | None[source]

Get the BSON type name for a literal value.

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

Convert type conversion operators to SQL.