neosqlite.collection.query_helper.window_operators module¶
Python implementation of MongoDB $setWindowFields operators.
- neosqlite.collection.query_helper.window_operators.process_set_window_fields(docs_with_context: list[dict[str, Any]], spec: dict[str, Any], collection: Collection, evaluator: ExprEvaluator) list[dict[str, Any]][source]¶
Python fallback implementation of $setWindowFields.
- neosqlite.collection.query_helper.window_operators._get_window_frame(current_idx: int, partition_docs: list[dict[str, Any]], window_spec: dict[str, Any] | None) list[int][source]¶
- neosqlite.collection.query_helper.window_operators._apply_window_operator(op_name: str, op_val: Any, current_idx: int, partition_docs: list[dict[str, Any]], frame_indices: list[int], evaluator: ExprEvaluator, collection: Collection, sort_by: dict[str, int]) Any[source]¶
- neosqlite.collection.query_helper.window_operators._get_sort_key(doc: dict[str, Any], sort_by: dict[str, int], collection: Collection) tuple[source]¶
- neosqlite.collection.query_helper.window_operators._calculate_all_ranks(partition_docs: list[dict[str, Any]], sort_by: dict[str, int], collection: Collection) list[int][source]¶
- neosqlite.collection.query_helper.window_operators._calculate_all_dense_ranks(partition_docs: list[dict[str, Any]], sort_by: dict[str, int], collection: Collection) list[int][source]¶