neosqlite.collection.temporary_table_aggregation.utils module

neosqlite.collection.temporary_table_aggregation.utils._sanitize_params(params: list[Any] | None) list[Any] | None[source]

Sanitize SQL parameters by converting ObjectId instances to strings.

SQLite doesn’t know how to bind ObjectId types, so we convert them to strings.

Parameters:

params – List of parameters or None

Returns:

Sanitized parameters with ObjectId converted to strings

neosqlite.collection.temporary_table_aggregation.utils._json_extract_field_with_objectid_support(json_function_prefix: str, field_name: str, is_local_field: bool = True) str[source]

Generate SQL expression to extract a field value with ObjectId support.

When a field contains an ObjectId (stored as {“__neosqlite_objectid__”:true,”id”:”…”}), this extracts just the ID string instead of the full JSON object.

Parameters:
  • json_function_prefix – The JSON function prefix (json or jsonb)

  • field_name – The field name to extract

  • is_local_field – Whether this is a local field (True) or foreign field (False)

Returns:

SQL expression string

Check if a match specification contains text search operations.

This function delegates to the centralized _contains_text_operator function to ensure consistent text search detection across all NeoSQLite components.

Parameters:

match_spec (dict[str, Any]) – The match specification to check for text search operations

Returns:

True if the match specification contains text search operations, False otherwise

Return type:

bool