Skip to main content

cursor

superduper.base.cursor

Source code

SelectResult​

SelectResult(self,
raw_cursor: Any,
id_field: str,
db: Optional[ForwardRef('Datalayer')] = None,
scores: Optional[Dict[str,
float]] = None,
schema: Optional[ForwardRef('Schema')] = None,
process_func: Optional[Callable] = None,
_it: int = 0) -> None
ParameterDescription
raw_cursorthe cursor to wrap
id_fieldthe field to use as the document id
dbthe datalayer to use to decode the documents
scoresa dict of scores to add to the documents
schemathe schema to use to decode the documents
_itan iterator to keep track of the current position in the cursor, Default is 0.
process_funca function to process the raw cursor output before

A wrapper around a raw cursor that adds some extra functionality.

A cursor that wraps a cursor and returns Document wrapping a dict including Encodable objects.