![]() Time is exceeded, the operation will be aborted andĮxecutionTimeout is raised. Specifies a time limit for a query operation. max_time_ms ( max_time_ms : Optional ) → ¶ Use max_time_ms() instead to limit server sideĮxecution time. ParametersĬhanged in version 3.7: Deprecated max_scan(). Raises TypeError if limit is not an integer. Limits the number of results to be returned by this cursor. Index: index to hint on (as an index specifier) The last hint applied to this cursor takes precedence If index is None any existing hint for this query isĬleared. Provided hint requires an index that does not exist on this collection,Īnd raises InvalidOperation if this cursor has One of which is indexed) pass the indexed field as a hint to When doing a query on multiple fields (at least Judicious use of hints can greatly improve query hint ( index : Optional ] ] ] ] ] ) → ¶Īdds a ‘hint’, telling Mongo the proper index to use for the query. Trace the operation in the server logs and in profile data. comment ( comment : Any ) → ¶Ĭomment: A string to attach to the query to help interpret and Property collection : Collection ¶Ĭursor is iterating. Only the last collation applied to this cursor has Raises TypeError if collation is not an instance ofĪlready been used. collation ( collation : Optional, Collation ] ] ) → Cursor ¶ Unevaluated, even if the current instance has been partially orĮxplicitly close / kill this cursor. Returns a new Cursor instance with options matching those that haveīeen set on the current instance. Parametersīatch_size: The size of each batch of results requested.Ĭlone ( ) → ¶ ![]() The last batch_sizeĪpplied to this cursor takes precedence. Raises ValueError if batch_size is less than 0.Ĭursor has already been used. Raises TypeError if batch_size is not an integer. If you set batch size to 1,000,000,000, MongoDB will currently only ![]() Should not be called directly by application developers - seeīatch_size can not override MongoDB’s internal limits on theĪmount of data it will return to the client in a single batch (i.e Cursor ( collection, filter = None, projection = None, skip = 0, limit = 0, no_cursor_timeout = False, cursor_type = CursorType.NON_TAILABLE, sort = None, allow_partial_results = False, oplog_replay = False, batch_size = 0, collation = None, hint = None, max_scan = None, max_time_ms = None, max = None, min = None, return_key = False, show_record_id = False, snapshot = False, comment = None, session = None, allow_disk_use = None ) ¶ MongoDB will stream batched results to the client without waiting for theĬlient to request each batch, reducing latency. The full result set so that it can capture and return additional data added TAILABLE_AWAIT ¶Ī tailable cursor with the await option set.Ĭreates a tailable cursor that will wait for a few seconds after returning Iteration of the cursor will continue from the last document received. Location marks the final document position. They are notĬlosed when the last data is retrieved but are kept open and the cursor Tailable cursors are only for use with capped collections. Cursor – Tools for iterating over MongoDB query results ¶Ĭursor class to iterate over Mongo query results.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |