
    &g                       S r SSKJr  SSKJr  SSKJrJrJrJ	r	J
r
JrJrJrJrJrJr  SSKJrJr  SSKJr  SSKJr  SSKJrJr  SS	KJr  SS
KJr  SSKJ r   SSK!J"r"  SSK#J$r$J%r%  SSK&J'r'J(r(  SSK)J*r*J+r+  SSK,J-r-  SSK.J/r/J0r0  SSK1J2r2J3r3J4r4J5r5  \(       a,  SSK6r6SSKr6SSK7J8r8  SSK9J:r:  SSK;J<r<  SSK=J>r>  SSK?J@r@  SSKAJBrB  SrC " S S\R                  \\3   5      rEg)zDatabase level operations.    )annotations)deepcopy)TYPE_CHECKINGAnyGenericMappingMutableMappingNoReturnOptionalSequenceUnioncastoverload)DEFAULT_CODEC_OPTIONSCodecOptions)DBRef)	Timestamp)_csotcommon)_DatabaseAggregationCommand)AsyncDatabaseChangeStreamAsyncCollection)AsyncCommandCursor)_ecoc_coll_name_esc_coll_name)_check_name_CodecDocumentType)CollectionInvalidInvalidOperation)_Op)ReadPreference_ServerMode)_CollationIn_DocumentType_DocumentTypeArg	_PipelineN)AsyncClientSessionAsyncMongoClient)AsyncConnection)Server)ReadConcern)WriteConcernFc            	        ^  \ rS rSr    S,             S-U 4S jjjr\S.S j5       r\S/S j5       r\    S0         S1S jj5       r	\   S2         S3S jj5       r	    S,         S4S	 jjr	S5S
 jr
S5S jrS6S jrS/S jrS7S jrS7S jr    S,           S8S jjr        S9S jrSrS:S jr\rS:S jr            S;                         S<S jjr\R0                        S=                 S>S jj5       r S?       S@S jjr\SSS\R8                  \SSS4                       SAS jj5       r\SSS\R8                  SSSS4                       SBS jj5       rSSS\R8                  \SSS4                       SCS jjr\       SD                   SES jj5       r\       SF                   SGS jj5       r\R0                         SD                   SHS jj5       r\R0                        SI                 SJS  jj5       r  S?       SKS! jjr!          SLS" jr"   SM         SNS# jjr#   SM         SNS$ jjr$   SM         SOS% jjr%   SM         SOS& jjr& SP       SQS' jjr'\R0                     SM         SRS( jj5       r(     SS             STS) jjr)  SP         SUS* jjr*S+r+U =r,$ )VAsyncDatabase=   Nc                L  > [         TU ]  U=(       d    UR                  U=(       d    UR                  U=(       d    UR                  U=(       d    UR
                  5        SSKJn  [        U[        5      (       d  [        S[        U5       35      e[        X5      (       dK  [        S [        U5      R                   5       5      (       d!  [        S[        U5      R                   35      eUS:w  a  [        U5        X l        Xl        UR$                  R&                  U l        g)a  Get a database by client and name.

Raises :class:`TypeError` if `name` is not an instance of
:class:`str`. Raises :class:`~pymongo.errors.InvalidName` if
`name` is not a valid database name.

:param client: A :class:`~pymongo.asynchronous.mongo_client.AsyncMongoClient` instance.
:param name: The database name.
:param codec_options: An instance of
    :class:`~bson.codec_options.CodecOptions`. If ``None`` (the
    default) client.codec_options is used.
:param read_preference: The read preference to use. If
    ``None`` (the default) client.read_preference is used.
:param write_concern: An instance of
    :class:`~pymongo.write_concern.WriteConcern`. If ``None`` (the
    default) client.write_concern is used.
:param read_concern: An instance of
    :class:`~pymongo.read_concern.ReadConcern`. If ``None`` (the
    default) client.read_concern is used.

.. seealso:: The MongoDB documentation on `databases <https://dochub.mongodb.org/core/databases>`_.

.. versionchanged:: 4.0
   Removed the eval, system_js, error, last_status, previous_error,
   reset_error_history, authenticate, logout, collection_names,
   current_op, add_user, remove_user, profiling_level,
   set_profiling_level, and profiling_info methods.
   See the :ref:`pymongo4-migration-guide`.

.. versionchanged:: 3.2
   Added the read_concern option.

.. versionchanged:: 3.0
   Added the codec_options, read_preference, and write_concern options.
   :class:`~pymongo.asynchronous.database.AsyncDatabase` no longer returns an instance
   of :class:`~pymongo.asynchronous.collection.AsyncCollection` for attribute names
   with leading underscores. You must use dict-style lookups instead::

       db['__my_collection__']

   Not:

       db.__my_collection__
r   r)   z%name must be an instance of str, not c              3  >   #    U  H  oR                   S :H  v   M     g7f)r*   N)__name__).0clss     bC:\Suresh\moveshuttle\MDcreated\moveengine\venv\Lib\site-packages\pymongo/asynchronous/database.py	<genexpr>)AsyncDatabase.__init__.<locals>.<genexpr>   s     ZEYc||'99EYs   z$AsyncMongoClient required but given z	$externalN)super__init__codec_optionsread_preferencewrite_concernread_concern!pymongo.asynchronous.mongo_clientr*   
isinstancestr	TypeErrortypeany__mro__r4   r   _name_clientoptionstimeout_timeout)	selfclientnamer<   r=   r>   r?   r*   	__class__s	           r7   r;   AsyncDatabase.__init__>   s    j 	1V115v551V11/F//		
 	G$$$CDJ<PQQ&33ZT&\EYEYZZZ"FtF|G\G\F] ^__;
8>..    c                    U R                   $ )z4The client instance for this :class:`AsyncDatabase`.)rH   rL   s    r7   rM   AsyncDatabase.client   s     ||rQ   c                    U R                   $ )z(The name of this :class:`AsyncDatabase`.)rG   rS   s    r7   rN   AsyncDatabase.name   s     zzrQ   .c                    g N rL   r<   r=   r>   r?   s        r7   with_optionsAsyncDatabase.with_options        	rQ   c                    g rX   rY   rZ   s        r7   r[   r\      r]   rQ   c           	         [        U R                  U R                  U=(       d    U R                  U=(       d    U R                  U=(       d    U R
                  U=(       d    U R                  5      $ )a  Get a clone of this database changing the specified settings.

  >>> db1.read_preference
  Primary()
  >>> from pymongo.read_preferences import Secondary
  >>> db2 = db1.with_options(read_preference=Secondary([{'node': 'analytics'}]))
  >>> db1.read_preference
  Primary()
  >>> db2.read_preference
  Secondary(tag_sets=[{'node': 'analytics'}], max_staleness=-1, hedge=None)

:param codec_options: An instance of
    :class:`~bson.codec_options.CodecOptions`. If ``None`` (the
    default) the :attr:`codec_options` of this :class:`AsyncCollection`
    is used.
:param read_preference: The read preference to use. If
    ``None`` (the default) the :attr:`read_preference` of this
    :class:`AsyncCollection` is used. See :mod:`~pymongo.read_preferences`
    for options.
:param write_concern: An instance of
    :class:`~pymongo.write_concern.WriteConcern`. If ``None`` (the
    default) the :attr:`write_concern` of this :class:`AsyncCollection`
    is used.
:param read_concern: An instance of
    :class:`~pymongo.read_concern.ReadConcern`. If ``None`` (the
    default) the :attr:`read_concern` of this :class:`AsyncCollection`
    is used.

.. versionadded:: 3.8
)r0   rH   rG   r<   r=   r>   r?   rZ   s        r7   r[   r\      sX    J LLJJ/T//3t33/T//-D--
 	
rQ   c                    [        U[        5      (       a9  U R                  UR                  :H  =(       a    U R                  UR
                  :H  $ [        $ rX   )rA   r0   rH   rM   rG   rN   NotImplementedrL   others     r7   __eq__AsyncDatabase.__eq__   s:    e]++<<5<</LDJJ%**4LLrQ   c                    X:X  + $ rX   rY   rb   s     r7   __ne__AsyncDatabase.__ne__   s      rQ   c                D    [        U R                  U R                  45      $ rX   )hashrH   rG   rS   s    r7   __hash__AsyncDatabase.__hash__   s    T\\4::.//rQ   c                j    [        U 5      R                   SU R                  < SU R                  < S3$ )N(z, ))rD   r4   rH   rG   rS   s    r7   __repr__AsyncDatabase.__repr__   s/    t*%%&a'7r$**qIIrQ   c           
         UR                  S5      (       a,  [        [        U 5      R                   SU< SU SU< S35      eU R	                  U5      $ )Get a collection of this database by name.

Raises InvalidName if an invalid collection name is used.

:param name: the name of the collection to get
_z has no attribute z. To access the z collection, use database[z].)
startswithAttributeErrorrD   r4   __getitem__rL   rN   s     r7   __getattr__AsyncDatabase.__getattr__   sa     ??3 :&&''9$AQRVQW,THB8  %%rQ   c                    [        X5      $ )rs   r   rx   s     r7   rw   AsyncDatabase.__getitem__   s     t**rQ   c           	     $    [        U USUUUU5      $ )ah  Get a :class:`~pymongo.asynchronous.collection.AsyncCollection` with the given name
and options.

Useful for creating a :class:`~pymongo.asynchronous.collection.AsyncCollection` with
different codec options, read preference, and/or write concern from
this :class:`AsyncDatabase`.

  >>> db.read_preference
  Primary()
  >>> coll1 = db.test
  >>> coll1.read_preference
  Primary()
  >>> from pymongo import ReadPreference
  >>> coll2 = db.get_collection(
  ...     'test', read_preference=ReadPreference.SECONDARY)
  >>> coll2.read_preference
  Secondary(tag_sets=None)

:param name: The name of the collection - a string.
:param codec_options: An instance of
    :class:`~bson.codec_options.CodecOptions`. If ``None`` (the
    default) the :attr:`codec_options` of this :class:`AsyncDatabase` is
    used.
:param read_preference: The read preference to use. If
    ``None`` (the default) the :attr:`read_preference` of this
    :class:`AsyncDatabase` is used. See :mod:`~pymongo.read_preferences`
    for options.
:param write_concern: An instance of
    :class:`~pymongo.write_concern.WriteConcern`. If ``None`` (the
    default) the :attr:`write_concern` of this :class:`AsyncDatabase` is
    used.
:param read_concern: An instance of
    :class:`~pymongo.read_concern.ReadConcern`. If ``None`` (the
    default) the :attr:`read_concern` of this :class:`AsyncDatabase` is
    used.
Fr   )rL   rN   r<   r=   r>   r?   s         r7   get_collectionAsyncDatabase.get_collection   s'    X 
 	
rQ   c           	       #    UR                  S5      nU(       a&  [        [        [        [        4   [        U5      5      $ U R                  R                  R                  (       a  U R                  R                  R                  R                  (       a  U R                  R                  R                  R                  R                  U R                   SU 35      (       a`  [        [        [        [        4   [        U R                  R                  R                  R                  U R                   SU 3   5      5      $ U(       a~  U R                  R                  R                  (       aY  X   R                  5       I S h  vN nUR                  S5      (       a)  [        [        [        [        4   [        US   5      5      $ g  ND7f)NencryptedFields.)getr   r   rB   r   r   rM   rI   auto_encryption_opts_encrypted_fields_maprN   )rL   kwargs	coll_nameask_dbencrypted_fieldsrI   s         r7   _get_encrypted_fields#AsyncDatabase._get_encrypted_fields2  sS     "::&78S)84D+EFFKK44##88NN##88NNRR99+Qyk*  S!KK''<<RR99+Qyk2  dkk))>> O3355G{{,--GCH-x@Q8R/STT 6s   FG
GAG
c                    [        S5      e)Nz&'AsyncDatabase' object is not iterable)rC   rS   s    r7   __next__AsyncDatabase.__next__P  s    @AArQ   c                D    [        [        U 5      R                   S35      e)Nzo objects do not implement truth value testing or bool(). Please compare with None instead: database is not None)NotImplementedErrorrD   r4   rS   s    r7   __bool__AsyncDatabase.__bool__U  s)    !Dz""# $6 6
 	
rQ   c                l   #    [        U UUUUUUUUU	U
UUS9nUR                  5       I Sh  vN   U$  N7f)a  Watch changes on this database.

Performs an aggregation with an implicit initial ``$changeStream``
stage and returns a
:class:`~pymongo.asynchronous.change_stream.AsyncDatabaseChangeStream` cursor which
iterates over changes on all collections in this database.

Introduced in MongoDB 4.0.

.. code-block:: python

   async with db.watch() as stream:
       async for change in stream:
           print(change)

The :class:`~pymongo.asynchronous.change_stream.AsyncDatabaseChangeStream` iterable
blocks until the next change document is returned or an error is
raised. If the
:meth:`~pymongo.asynchronous.change_stream.AsyncDatabaseChangeStream.next` method
encounters a network error when retrieving a batch from the server,
it will automatically attempt to recreate the cursor such that no
change events are missed. Any error encountered during the resume
attempt indicates there may be an outage and will be raised.

.. code-block:: python

    try:
        async with db.watch([{"$match": {"operationType": "insert"}}]) as stream:
            async for insert_change in stream:
                print(insert_change)
    except pymongo.errors.PyMongoError:
        # The AsyncChangeStream encountered an unrecoverable error or the
        # resume attempt failed to recreate the cursor.
        logging.error("...")

For a precise description of the resume process see the
`change streams specification`_.

:param pipeline: A list of aggregation pipeline stages to
    append to an initial ``$changeStream`` stage. Not all
    pipeline stages are valid after a ``$changeStream`` stage, see the
    MongoDB documentation on change streams for the supported stages.
:param full_document: The fullDocument to pass as an option
    to the ``$changeStream`` stage. Allowed values: 'updateLookup',
    'whenAvailable', 'required'. When set to 'updateLookup', the
    change notification for partial updates will include both a delta
    describing the changes to the document, as well as a copy of the
    entire document that was changed from some time after the change
    occurred.
:param full_document_before_change: Allowed values: 'whenAvailable'
    and 'required'. Change events may now result in a
    'fullDocumentBeforeChange' response field.
:param resume_after: A resume token. If provided, the
    change stream will start returning changes that occur directly
    after the operation specified in the resume token. A resume token
    is the _id value of a change document.
:param max_await_time_ms: The maximum time in milliseconds
    for the server to wait for changes before responding to a getMore
    operation.
:param batch_size: The maximum number of documents to return
    per batch.
:param collation: The :class:`~pymongo.collation.Collation`
    to use for the aggregation.
:param start_at_operation_time: If provided, the resulting
    change stream will only return changes that occurred at or after
    the specified :class:`~bson.timestamp.Timestamp`. Requires
    MongoDB >= 4.0.
:param session: a
    :class:`~pymongo.asynchronous.client_session.AsyncClientSession`.
:param start_after: The same as `resume_after` except that
    `start_after` can resume notifications after an invalidate event.
    This option and `resume_after` are mutually exclusive.
:param comment: A user-provided comment to attach to this
    command.
:param show_expanded_events: Include expanded events such as DDL events like `dropIndexes`.

:return: A :class:`~pymongo.asynchronous.change_stream.AsyncDatabaseChangeStream` cursor.

.. versionchanged:: 4.3
   Added `show_expanded_events` parameter.

.. versionchanged:: 4.2
    Added ``full_document_before_change`` parameter.

.. versionchanged:: 4.1
   Added ``comment`` parameter.

.. versionchanged:: 3.9
   Added the ``start_after`` parameter.

.. versionadded:: 3.7

.. seealso:: The MongoDB documentation on `changeStreams <https://mongodb.com/docs/manual/changeStreams/>`_.

.. _change streams specification:
    https://github.com/mongodb/specifications/blob/master/source/change-streams/change-streams.md
)show_expanded_eventsN)r   _initialize_cursor)rL   pipelinefull_documentresume_aftermax_await_time_ms
batch_size	collationstart_at_operation_timesessionstart_aftercommentfull_document_before_changer   change_streams                 r7   watchAsyncDatabase.watch\  sX     ` 2#'!5
  ..000 	1s   )424Tc           
       #    U R                  XS5      I Sh  vN n	U	(       a  [        R                  " SU	5        XS'   UR                  S5      n
U
(       a  [        R                  " SU
5        U R                  R                  U5       ISh  vN nU(       aC  U(       a  UR                  (       d+  XR                  SU0US9I Sh  vN ;   a  [        SU-  5      e[        U USUUUU5      nUR                  X5      I Sh  vN   UsSSS5      ISh  vN   $  GN N NW N N! , ISh  vN  (       d  f       g= f7f)a  Create a new :class:`~pymongo.asynchronous.collection.AsyncCollection` in this
database.

Normally collection creation is automatic. This method should
only be used to specify options on
creation. :class:`~pymongo.errors.CollectionInvalid` will be
raised if the collection already exists.

:param name: the name of the collection to create
:param codec_options: An instance of
    :class:`~bson.codec_options.CodecOptions`. If ``None`` (the
    default) the :attr:`codec_options` of this :class:`AsyncDatabase` is
    used.
:param read_preference: The read preference to use. If
    ``None`` (the default) the :attr:`read_preference` of this
    :class:`AsyncDatabase` is used.
:param write_concern: An instance of
    :class:`~pymongo.write_concern.WriteConcern`. If ``None`` (the
    default) the :attr:`write_concern` of this :class:`AsyncDatabase` is
    used.
:param read_concern: An instance of
    :class:`~pymongo.read_concern.ReadConcern`. If ``None`` (the
    default) the :attr:`read_concern` of this :class:`AsyncDatabase` is
    used.
:param collation: An instance of
    :class:`~pymongo.collation.Collation`.
:param session: a
    :class:`~pymongo.asynchronous.client_session.AsyncClientSession`.
:param check_exists: if True (the default), send a listCollections command to
    check if the collection already exists before creation.
:param kwargs: additional keyword arguments will
    be passed as options for the `create collection command`_

All optional `create collection command`_ parameters should be passed
as keyword arguments to this method. Valid options include, but are not
limited to:

  - ``size`` (int): desired initial size for the collection (in
    bytes). For capped collections this size is the max
    size of the collection.
  - ``capped`` (bool): if True, this is a capped collection
  - ``max`` (int): maximum number of objects if capped (optional)
  - ``timeseries`` (dict): a document specifying configuration options for
    timeseries collections
  - ``expireAfterSeconds`` (int): the number of seconds after which a
    document in a timeseries collection expires
  - ``validator`` (dict): a document specifying validation rules or expressions
    for the collection
  - ``validationLevel`` (str): how strictly to apply the
    validation rules to existing documents during an update.  The default level
    is "strict"
  - ``validationAction`` (str): whether to "error" on invalid documents
    (the default) or just "warn" about the violations but allow invalid
    documents to be inserted
  - ``indexOptionDefaults`` (dict): a document specifying a default configuration
    for indexes when creating a collection
  - ``viewOn`` (str): the name of the source collection or view from which
    to create the view
  - ``pipeline`` (list): a list of aggregation pipeline stages
  - ``comment`` (str): a user-provided comment to attach to this command.
    This option is only supported on MongoDB >= 4.4.
  - ``encryptedFields`` (dict): **(BETA)** Document that describes the encrypted fields for
    Queryable Encryption. For example::

        {
          "escCollection": "enxcol_.encryptedCollection.esc",
          "ecocCollection": "enxcol_.encryptedCollection.ecoc",
          "fields": [
              {
                  "path": "firstName",
                  "keyId": Binary.from_uuid(UUID('00000000-0000-0000-0000-000000000000')),
                  "bsonType": "string",
                  "queries": {"queryType": "equality"}
              },
              {
                  "path": "ssn",
                  "keyId": Binary.from_uuid(UUID('04104104-1041-0410-4104-104104104104')),
                  "bsonType": "string"
              }
            ]
        }
  - ``clusteredIndex`` (dict): Document that specifies the clustered index
    configuration. It must have the following form::

        {
            // key pattern must be {_id: 1}
            key: <key pattern>, // required
            unique: <bool>, // required, must be `true`
            name: <string>, // optional, otherwise automatically generated
            v: <int>, // optional, must be `2` if provided
        }
  - ``changeStreamPreAndPostImages`` (dict): a document with a boolean field ``enabled`` for
    enabling pre- and post-images.

.. versionchanged:: 4.2
   Added the ``check_exists``, ``clusteredIndex``, and  ``encryptedFields`` parameters.

.. versionchanged:: 3.11
   This method is now supported inside multi-document transactions
   with MongoDB 4.4+.

.. versionchanged:: 3.6
   Added ``session`` parameter.

.. versionchanged:: 3.4
   Added the collation option.

.. versionchanged:: 3.0
   Added the codec_options, read_preference, and write_concern options.

.. _create collection command:
    https://mongodb.com/docs/manual/reference/command/create
FNr   clusteredIndexrN   )filterr   zcollection %s already exists)r   r   validate_is_mappingr   rH   _tmp_sessionin_transaction_list_collection_namesr   r   _create)rL   rN   r<   r=   r>   r?   r   check_existsr   r   clustered_indexscolls                r7   create_collectionAsyncDatabase.create_collection  s    z "&!;!;F%!PP&&'8:JK(8$% **%56&&'7I<<,,W55 !"2"2"="=fd^]^"="___'(F(MNN"D ,,v)))) 655 Q 6 ` *% 6555s|   D>DA4D>DD>5D$D:D$D D$D>D"D>D>D$ D$"D>$D;*D-+D;7D>c                  #    U R                   R                  USS9 ISh  vN n[        U [        UUUSLSSS00S9nU R                   R	                  UR
                  UR                  U5      UUR                  (       + [        R                  S9I Sh  vN sSSS5      ISh  vN   $  N N N	! , ISh  vN  (       d  f       g= f7f)	aS	  Perform a database-level aggregation.

See the `aggregation pipeline`_ documentation for a list of stages
that are supported.

.. code-block:: python

   # Lists all operations currently running on the server.
   with client.admin.aggregate([{"$currentOp": {}}]) as cursor:
       for operation in cursor:
           print(operation)

The :meth:`aggregate` method obeys the :attr:`read_preference` of this
:class:`AsyncDatabase`, except when ``$out`` or ``$merge`` are used, in
which case  :attr:`~pymongo.read_preferences.ReadPreference.PRIMARY`
is used.

.. note:: This method does not support the 'explain' option. Please
   use :meth:`~pymongo.asynchronous.database.AsyncDatabase.command` instead.

.. note:: The :attr:`~pymongo.asynchronous.database.AsyncDatabase.write_concern` of
   this collection is automatically applied to this operation.

:param pipeline: a list of aggregation pipeline stages
:param session: a
    :class:`~pymongo.asynchronous.client_session.AsyncClientSession`.
:param kwargs: extra `aggregate command`_ parameters.

All optional `aggregate command`_ parameters should be passed as
keyword arguments to this method. Valid options include, but are not
limited to:

  - `allowDiskUse` (bool): Enables writing to temporary files. When set
    to True, aggregation stages can write data to the _tmp subdirectory
    of the --dbpath directory. The default is False.
  - `maxTimeMS` (int): The maximum amount of time to allow the operation
    to run in milliseconds.
  - `batchSize` (int): The maximum number of documents to return per
    batch. Ignored if the connected mongod or mongos does not support
    returning aggregate results using a cursor.
  - `collation` (optional): An instance of
    :class:`~pymongo.collation.Collation`.
  - `let` (dict): A dict of parameter names and values. Values must be
    constant or closed expressions that do not reference document
    fields. Parameters can then be accessed as variables in an
    aggregate expression context (e.g. ``"$$var"``). This option is
    only supported on MongoDB >= 5.0.

:return: A :class:`~pymongo.asynchronous.command_cursor.AsyncCommandCursor` over the result
  set.

.. versionadded:: 3.9

.. _aggregation pipeline:
    https://mongodb.com/docs/manual/reference/operator/aggregation-pipeline

.. _aggregate command:
    https://mongodb.com/docs/manual/reference/command/aggregate
FcloseNcursor
firstBatch   )user_fields)	retryable	operation)
rM   r   r   r   _retryable_read
get_cursorget_read_preference_performs_writer!   	AGGREGATE)rL   r   r   r   r   cmds         r7   	aggregateAsyncDatabase.aggregate{  s     | ;;++G5+AAQ-"t#%a'89C 44''*!111-- 5   BAA BAAAsW   C
B*C
A/B0B,B0C
$B.%C
,B0.C
0C6B97CC
r   Fc                   #    g 7frX   rY   rL   conncommandvaluecheckallowable_errorsr=   r<   r>   parse_write_concern_errorr   r   s               r7   _commandAsyncDatabase._command  
      	   c                   #    g 7frX   rY   r   s               r7   r   r     r   r   c                n  #    [        U[        5      (       a  X#0nUR                  U5        U R                  R	                  U
5       ISh  vN nUR                  U R                  UUUUUUU	UU R                  S9
I Sh  vN sSSS5      ISh  vN   $  NI N N	! , ISh  vN  (       d  f       g= f7f)zInternal command helper.N)r>   r   r   rM   )rA   rB   updaterH   r   r   rG   )rL   r   r   r   r   r   r=   r<   r>   r   r   r   r   s                r7   r   r     s     " gs##&Gv<<,,W55

 +*C|| &   655 6555sZ   A	B5BB50B?B BB5BB5BB5B2!B$"B2.B5c	                   #    g 7frX   rY   
rL   r   r   r   r   r=   r<   r   r   r   s
             r7   r   AsyncDatabase.command  
      	r   c	                   #    g 7frX   rY   r   s
             r7   r   r     r   r   c	           
       #    U=(       d    [         n
Ub  XS'   [        U[        5      (       a  UnO[        [	        U5      5      nUc0  U=(       a    UR                  5       =(       d    [        R                  nU R                  R                  XWUS9I Sh  vN  ISh  vN u  nnU R                  " UUUUUUU
4SU0U	D6I Sh  vN sSSS5      ISh  vN   $  ND N= N N! , ISh  vN  (       d  f       g= f7f)a  Issue a MongoDB command.

Send command `command` to the database and return the
response. If `command` is an instance of :class:`str`
then the command {`command`: `value`} will be sent.
Otherwise, `command` must be an instance of
:class:`dict` and will be sent as is.

Any additional keyword arguments will be added to the final
command document before it is sent.

For example, a command like ``{buildinfo: 1}`` can be sent
using:

>>> await db.command("buildinfo")
OR
>>> await db.command({"buildinfo": 1})

For a command where the value matters, like ``{count:
collection_name}`` we can do:

>>> await db.command("count", collection_name)
OR
>>> await db.command({"count": collection_name})

For commands that take additional arguments we can use
kwargs. So ``{count: collection_name, query: query}`` becomes:

>>> await db.command("count", collection_name, query=query)
OR
>>> await db.command({"count": collection_name, "query": query})

:param command: document representing the command to be issued,
    or the name of the command (for simple commands only).

    .. note:: the order of keys in the `command` document is
       significant (the "verb" must come first), so commands
       which require multiple keys (e.g. `findandmodify`)
       should be done with this in mind.

:param value: value to use for the command verb when
    `command` is passed as a string
:param check: check the response for errors, raising
    :class:`~pymongo.errors.OperationFailure` if there are any
:param allowable_errors: if `check` is ``True``, error messages
    in this list will be ignored by error-checking
:param read_preference: The read preference for this
    operation. See :mod:`~pymongo.read_preferences` for options.
    If the provided `session` is in a transaction, defaults to the
    read preference configured for the transaction.
    Otherwise, defaults to
    :attr:`~pymongo.read_preferences.ReadPreference.PRIMARY`.
:param codec_options: A :class:`~bson.codec_options.CodecOptions`
    instance.
:param session: A
    :class:`~pymongo.asynchronous.client_session.AsyncClientSession`.
:param comment: A user-provided comment to attach to this
    command.
:param kwargs: additional keyword arguments will
    be added to the command document before it is sent


.. note:: :meth:`command` does **not** obey this AsyncDatabase's
   :attr:`read_preference` or :attr:`codec_options`. You must use the
   ``read_preference`` and ``codec_options`` parameters instead.

.. note:: :meth:`command` does **not** apply any custom TypeDecoders
   when decoding the command response.

.. note:: If this client has been configured to use MongoDB Stable
   API (see :ref:`versioned-api-ref`), then :meth:`command` will
   automatically add API versioning options to the given command.
   Explicitly adding API versioning options in the command and
   declaring an API version on the client is not supported.

.. versionchanged:: 3.6
   Added ``session`` parameter.

.. versionchanged:: 3.0
   Removed the `as_class`, `fields`, `uuid_subtype`, `tag_sets`,
   and `secondary_acceptable_latency_ms` option.
   Removed `compile_re` option: PyMongo now always represents BSON
   regular expressions as :class:`~bson.regex.Regex` objects. Use
   :meth:`~bson.regex.Regex.try_compile` to attempt to convert from a
   BSON regular expression to a Python regular expression object.
   Added the ``codec_options`` parameter.

.. seealso:: The MongoDB documentation on `commands <https://dochub.mongodb.org/core/commands>`_.
Nr   r   r   )r   rA   rB   nextiter_txn_read_preferencer"   PRIMARYrH   _conn_for_readsr   )rL   r   r   r   r   r=   r<   r   r   r   optscommand_name
connections                r7   r   r   -  s     L 5 5 '9gs##"LW.L"&I7+G+G+IdnNdNdO55 6 
 
 
 

 
  
 
 

 
 


 
 
 
sl   BC<CC<CC<""C"CC"C<C C<C<C" C<"C9(C+)C95C<c                  #    [        U[        5      (       a  Un	O[        [        U5      5      n	U R                  R                  USS9 ISh  vN n
U=(       d    [        nUc0  U
=(       a    U
R                  5       =(       d    [        R                  nU R                  R                  X:U	5      I Sh  vN  ISh  vN u  nnU R                  " UUUSSUU4SU
0UD6I Sh  vN nU R                  SUS9nUR                  S5      (       a[  [        UUS   UR                  UU
USLUS	9nUR!                  U5      I Sh  vN   UsSSS5      ISh  vN   sSSS5      ISh  vN   $ [#        S
5      e GN& N N N N< N, N! , ISh  vN  (       d  f       O= fSSS5      ISh  vN    g! , ISh  vN  (       d  f       g= f7f)a  Issue a MongoDB command and parse the response as a cursor.

If the response from the server does not include a cursor field, an error will be thrown.

Otherwise, behaves identically to issuing a normal MongoDB command.

:param command: document representing the command to be issued,
    or the name of the command (for simple commands only).

    .. note:: the order of keys in the `command` document is
       significant (the "verb" must come first), so commands
       which require multiple keys (e.g. `findandmodify`)
       should use an instance of :class:`~bson.son.SON` or
       a string and kwargs instead of a Python `dict`.

:param value: value to use for the command verb when
  `command` is passed as a string
:param read_preference: The read preference for this
  operation. See :mod:`~pymongo.read_preferences` for options.
  If the provided `session` is in a transaction, defaults to the
  read preference configured for the transaction.
  Otherwise, defaults to
  :attr:`~pymongo.read_preferences.ReadPreference.PRIMARY`.
:param codec_options: A :class:`~bson.codec_options.CodecOptions`
  instance.
:param session: A
  :class:`~pymongo.asynchronous.client_session.AsyncClientSession`.
:param comment: A user-provided comment to attach to future getMores for this
  command.
:param max_await_time_ms: The number of ms to wait for more data on future getMores for this command.
:param kwargs: additional keyword arguments will
  be added to the command document before it is sent

.. note:: :meth:`command` does **not** obey this AsyncDatabase's
   :attr:`read_preference` or :attr:`codec_options`. You must use the
   ``read_preference`` and ``codec_options`` parameters instead.

.. note:: :meth:`command` does **not** apply any custom TypeDecoders
   when decoding the command response.

.. note:: If this client has been configured to use MongoDB Stable
   API (see :ref:`versioned-api-ref`), then :meth:`command` will
   automatically add API versioning options to the given command.
   Explicitly adding API versioning options in the command and
   declaring an API version on the client is not supported.

.. seealso:: The MongoDB documentation on `commands <https://dochub.mongodb.org/core/commands>`_.
Fr   NTr   $cmdr=   r   )r   r   explicit_sessionr   z!Command does not return a cursor.)rA   rB   r   r   rH   r   r   r   r"   r   r   r   r~   r   r   address_maybe_pin_connectionr    )rL   r   r   r=   r<   r   r   r   r   r   tmp_sessionr   r   responser   
cmd_cursors                   r7   cursor_commandAsyncDatabase.cursor_command  s    x gs##"LW.L<<,,WE,BBk 9$9D&FK$D$D$F#,#++   "\\99l   !%#
" (
" 
" 
 **6?*S<<))!3 **; +)0)< '"J %::4@@@%;   CBBL ++NOOM C
, A9 C   CBBBBBs   AGE3GA"F.3E64F.<E8=F. "F"E:#AF?E< FF.E>F.G"F #G(F3G6F.8F.:F<F>F. GF	F	F	F.G'F*(G.G4F75GGc                   ^ ^#    U=(       a    UR                  5       =(       d    [        R                  n          SUU 4S jjnT R                  R	                  XTX25      I Sh  vN $  N7f)z5Same as command but used for retryable read commands.c                D   >#    TR                  UTUU S9I S h  vN $  N7f)Nr=   r   )r   )r   _serverr   r=   r   rL   s       r7   _cmd3AsyncDatabase._retryable_read_command.<locals>._cmd"  s4       /	 '    s     N)
r   Optional[AsyncClientSession]r   r,   r   r+   r=   r#   returndict[str, Any])r   r"   r   rH   r   )rL   r   r   r   r=   r   s   ``    r7   _retryable_read_command%AsyncDatabase._retryable_read_command  s}      #Ew'C'C'E`.J`J`	1		 "	 )		
 	 	 \\11$\\\\s   A#A.'A,(A.c                  #    [        [        [        [        [        4      U R                  SUS95      nS0 S.nUR                  U5        U R                  R                  USS9 ISh  vN nU R                  XX7S9I Sh  vN S	   n[        UUUR                  UUSLUR                  S
5      S9n	SSS5      ISh  vN   W	R                  U5      I Sh  vN   U	$  Ns N] N#! , ISh  vN  (       d  f       N8= f N&7f)z Internal listCollections helper.r   r   r   )listCollectionsr   Fr   Nr   r   r   )r   r   r   )r   r   r	   rB   r   r~   r   rH   r   r   r   r   r   r   )
rL   r   r   r=   r   r   r   r   r   r   s
             r7   _list_collectionsAsyncDatabase._list_collections1  s      N3845H
 #$r2

6<<,,WE,BBkmmDmddF ,#!(!4	*J	 CB ..t444 Cd CBBB 	5sf   A'C?)C*C?-C#C0C#2C?=C!>C?C=C?C#!C?#C:)C,*C:6C?c                  ^ ^#    Ub  UTS'   U=(       a    UR                  5       =(       d    [        R                  nUb  UTS'             SUU 4S jjnT R                  R	                  XeU[
        R                  S9I Sh  vN $  N7f)  Get a cursor over the collections of this database.

:param session: a
    :class:`~pymongo.asynchronous.client_session.AsyncClientSession`.
:param filter:  A query document to filter the list of
    collections returned from the listCollections command.
:param comment: A user-provided comment to attach to this
    command.
:param kwargs: Optional parameters of the
    `listCollections command
    <https://mongodb.com/docs/manual/reference/command/listCollections/>`_
    can be passed as keyword arguments to this method. The supported
    options differ by server version.


:return: An instance of :class:`~pymongo.asynchronous.command_cursor.AsyncCommandCursor`.

.. versionadded:: 3.6
Nr   r   c                J   >#    TR                   " X 4SU0TD6I S h  vN $  N7f)Nr=   )r   )r   r   r   r=   r   rL   s       r7   r   4AsyncDatabase._list_collections_helper.<locals>._cmdn  s8      ///>BH   s   #!#r   )
r   r   r   r,   r   r+   r=   r#   r   ,AsyncCommandCursor[MutableMapping[str, Any]])r   r"   r   rH   r   r!   LIST_COLLECTIONS)rL   r   r   r   r   	read_prefr   s   `   `  r7   _list_collections_helper&AsyncDatabase._list_collections_helperN  s     4 %F8?!=!=!?ZNDZDZ	 'F9	1		 "	 )		
 :	 	 \\11W0D0D 2 
 
 	
 
s   B BB	Bc                F   #    U R                   " XU40 UD6I Sh  vN $  N7f)r   N)r  rL   r   r   r   r   s        r7   list_collectionsAsyncDatabase.list_collections|  s%     4 227GVvVVVV   !!c                  #    Ub  X4S'   Uc  SUS'   O<[         R                  " SU5        X$S'   U(       a  [        U5      S:X  a  SU;   a  SUS'   U R                  " SSU0UD6I S h  vN  Vs/ s S h  vN nUS   PM   N N
 sn$ s  snf 7f)	Nr   TnameOnlyr   r   rN   r   rY   )r   r   lenr  )rL   r   r   r   r   results         r7   r   $AsyncDatabase._list_collection_names  s       '9>!%F:
 &&x8%8c&kQ.6V3C%)z" '+&C&C&^G&^W]&^ ^ ^
 
 6N ^
 	
 
sH   A$B&A?'B-B/B3B
4B7B?BBBBc                F   #    U R                   " XU40 UD6I Sh  vN $  N7f)aB  Get a list of all the collection names in this database.

For example, to list all non-system collections::

    filter = {"name": {"$regex": r"^(?!system\.)"}}
    db.list_collection_names(filter=filter)

:param session: a
    :class:`~pymongo.asynchronous.client_session.AsyncClientSession`.
:param filter:  A query document to filter the list of
    collections returned from the listCollections command.
:param comment: A user-provided comment to attach to this
    command.
:param kwargs: Optional parameters of the
    `listCollections command
    <https://mongodb.com/docs/manual/reference/command/listCollections/>`_
    can be passed as keyword arguments to this method. The supported
    options differ by server version.


.. versionchanged:: 3.8
   Added the ``filter`` and ``**kwargs`` parameters.

.. versionadded:: 3.6
N)r   r  s        r7   list_collection_names#AsyncDatabase.list_collection_names  s&     @ 00'TVTTTTr  c           
     R  #    SU0nUb  X4S'   U R                   R                  U[        R                  S9I S h  vN  IS h  vN nU R	                  UUSS/U R                  U5      SUS9I S h  vN sS S S 5      IS h  vN   $  NK ND N N! , IS h  vN  (       d  f       g = f7f)Ndropr   r   zns not found   T)r   r>   r   r   )rH   _conn_for_writesr!   DROPr   _write_concern_for)rL   rN   r   r   r   r   s         r7   _drop_helperAsyncDatabase._drop_helper  s      4.!(I66w#((6SSSSWa"0"!5"55g>*. '   TSS TSSSsi   7B'BB'BB')B/B	0B3B'?B B'B'	BB'B$BB$ B'c                  #    Un[        U[        5      (       a  UR                  n[        U[        5      (       d  [	        S[        U5       35      eU R                  SU0US5      I Sh  vN nU(       aY  [        R                  " SU5        U R                  [        XE5      X#S9I Sh  vN   U R                  [        XE5      X#S9I Sh  vN   U R                  XRU5      I Sh  vN $  N~ NA N" N
7f)a  Drop a collection.

:param name_or_collection: the name of a collection to drop or the
    collection object itself
:param session: a
    :class:`~pymongo.asynchronous.client_session.AsyncClientSession`.
:param comment: A user-provided comment to attach to this
    command.
:param encrypted_fields: **(BETA)** Document that describes the encrypted fields for
    Queryable Encryption. For example::

        {
          "escCollection": "enxcol_.encryptedCollection.esc",
          "ecocCollection": "enxcol_.encryptedCollection.ecoc",
          "fields": [
              {
                  "path": "firstName",
                  "keyId": Binary.from_uuid(UUID('00000000-0000-0000-0000-000000000000')),
                  "bsonType": "string",
                  "queries": {"queryType": "equality"}
              },
              {
                  "path": "ssn",
                  "keyId": Binary.from_uuid(UUID('04104104-1041-0410-4104-104104104104')),
                  "bsonType": "string"
              }
          ]

        }


.. note:: The :attr:`~pymongo.asynchronous.database.AsyncDatabase.write_concern` of
   this database is automatically applied to this operation.

.. versionchanged:: 4.2
   Added ``encrypted_fields`` parameter.

.. versionchanged:: 4.1
   Added ``comment`` parameter.

.. versionchanged:: 3.6
   Added ``session`` parameter.

.. versionchanged:: 3.4
   Apply this database's write concern automatically to this operation
   when connected to MongoDB >= 3.4.

z3name_or_collection must be an instance of str, not r   TNr   r   r   )rA   r   rN   rB   rC   rD   r   r   r   r  r   r   )rL   name_or_collectionr   r   r   rN   s         r7   drop_collectionAsyncDatabase.drop_collection  s    p "dO,,99D$$$QRVW[R\Q]^__!%!;!; 01"
 

 &&'9;KL##/6 $    ## 07 $    &&tg>>>
 ?sH   A(C1*C)+>C1)C+* C1
C-C1$C/%C1+C1-C1/C1c                  #    Un[        U[        5      (       a  UR                  n[        U[        5      (       d  [	        S[        U5       35      eXrUS.nUb  XhS'   Ub  XXS'   U R                  XS9I Sh  vN n	Sn
SU	;   a@  U	S   nUR                  S	5      S
:w  d  UR                  S5      S
:w  a  [        U SU 35      eOSU	;   a  U	S   R                  5        Hg  u  pSU;   aA  US   nUR                  S	5      S
:w  d  UR                  S5      S
:w  a  [        U SU 35      eML  UR                  SS5      (       a  Me  Sn
  O   OU	R                  SS5      (       d  Sn
U
(       d  [        U SU	< 35      eU	$  GN7f)aA  Validate a collection.

Returns a dict of validation info. Raises CollectionInvalid if
validation fails.

See also the MongoDB documentation on the `validate command`_.

:param name_or_collection: An AsyncCollection object or the name of a
    collection to validate.
:param scandata: Do extra checks beyond checking the overall
    structure of the collection.
:param full: Have the server do a more thorough scan of the
    collection. Use with `scandata` for a thorough scan
    of the structure of the collection and the individual
    documents.
:param session: a
    :class:`~pymongo.asynchronous.client_session.AsyncClientSession`.
:param background: A boolean flag that determines whether
    the command runs in the background. Requires MongoDB 4.4+.
:param comment: A user-provided comment to attach to this
    command.

.. versionchanged:: 4.1
   Added ``comment`` parameter.

.. versionchanged:: 3.11
   Added ``background`` parameter.

.. versionchanged:: 3.6
   Added ``session`` parameter.

.. _validate command: https://mongodb.com/docs/manual/reference/command/validate/
zFname_or_collection must be an instance of str or AsyncCollection, not )validatescandatafullNr   
background)r   Tr  	exceptioncorruptz
 invalid: rawvalidF)rA   r   rN   rB   rC   rD   r   findr   itemsr   )rL   r  r   r!  r   r"  r   rN   r   r  r'  infort   ress                 r7   validate_collection!AsyncDatabase.validate_collection2  s    T "dO,,99D$$$XY]^bYcXde   tD$	N! *||C|99v(#Dyy%+tyy/Cr/I'4&
4&(ABB 0J f_ ---/s?x=Dyy-3tyy7Kr7Q/4&
4&0IJJ 8R%00!E 0 GU++E#tfJvj$ABB3 :s   A5E?7E<8CE?;E?c                n  #    [        U[        5      (       d  [        S[        U5      -  5      eUR                  bB  UR                  U R
                  :w  a(  [        SUR                  < SU R
                  < S35      eXR                     R                  " SUR                  04X#S.UD6I Sh  vN $  N7f)a-  Dereference a :class:`~bson.dbref.DBRef`, getting the
document it points to.

Raises :class:`TypeError` if `dbref` is not an instance of
:class:`~bson.dbref.DBRef`. Returns a document, or ``None`` if
the reference does not point to a valid document.  Raises
:class:`ValueError` if `dbref` has a database specified that
is different from the current database.

:param dbref: the reference
:param session: a
    :class:`~pymongo.asynchronous.client_session.AsyncClientSession`.
:param comment: A user-provided comment to attach to this
    command.
:param kwargs: any additional keyword arguments
    are the same as the arguments to
    :meth:`~pymongo.asynchronous.collection.AsyncCollection.find`.


.. versionchanged:: 4.1
   Added ``comment`` parameter.
.. versionchanged:: 3.6
   Added ``session`` parameter.
zcannot dereference a %sNz?trying to dereference a DBRef that points to another database (z not ro   _idr  )
rA   r   rC   rD   databaserG   
ValueError
collectionfind_oneid)rL   dbrefr   r   r   s        r7   dereferenceAsyncDatabase.dereference  s     > %''5UCDD>>%%..DJJ*F%%*^^$6eDJJ>L  **+44EHH
'.
CI
 
 	
 
s   B,B5.B3/B5)rH   rG   rK   )NNNN)rM   AsyncMongoClient[_DocumentType]rN   rB   r<   (Optional[CodecOptions[_DocumentTypeArg]]r=   Optional[_ServerMode]r>   Optional[WriteConcern]r?   Optional[ReadConcern]r   None)r   r8  )r   rB   )N...)
r<   r=  r=   r:  r>   r;  r?   r<  r   zAsyncDatabase[_DocumentType])...)
r<   z#bson.CodecOptions[_DocumentTypeArg]r=   r:  r>   r;  r?   r<  r   zAsyncDatabase[_DocumentTypeArg])
r<   r9  r=   r:  r>   r;  r?   r<  r   z>AsyncDatabase[_DocumentType] | AsyncDatabase[_DocumentTypeArg])rc   r   r   bool)r   int)rN   rB   r   AsyncCollection[_DocumentType])rN   rB   r<   r9  r=   r:  r>   r;  r?   r<  r   r@  )r   zMapping[str, Any]r   rB   r   r>  r   Optional[Mapping[str, Any]])r   r
   )NNNNNNNNNNNN)r   zOptional[_Pipeline]r   Optional[str]r   rA  r   Optional[int]r   rC  r   zOptional[_CollationIn]r   zOptional[Timestamp]r   r   r   rA  r   Optional[Any]r   rB  r   Optional[bool]r   z(AsyncDatabaseChangeStream[_DocumentType])NNNNNT)rN   rB   r<   r9  r=   r:  r>   r;  r?   r<  r   r   r   rE  r   r   r   r@  rX   )r   r'   r   r   r   r   r   !AsyncCommandCursor[_DocumentType])r   r+   r   $Union[str, MutableMapping[str, Any]]r   r?  r   r>  r   #Optional[Sequence[Union[str, int]]]r=   r#   r<   zCodecOptions[dict[str, Any]]r>   r;  r   r>  r   r   r   r   r   r   )r   r+   r   rG  r   r?  r   r>  r   rH  r=   r#   r<    CodecOptions[_CodecDocumentType]r>   r;  r   r>  r   r   r   r   r   r   )r   r+   r   rG  r   r?  r   r>  r   rH  r=   r#   r<   zEUnion[CodecOptions[dict[str, Any]], CodecOptions[_CodecDocumentType]]r>   r;  r   r>  r   r   r   r   r   )Union[dict[str, Any], _CodecDocumentType])r   TNNNNN)r   rG  r   r   r   r>  r   rH  r=   r:  r<   r=  r   r   r   rD  r   r   r   r   )r   TNN.NN)r   rG  r   r   r   r>  r   rH  r=   r:  r<   rI  r   r   r   rD  r   r   r   r   )r   rG  r   r   r   r>  r   rH  r=   r:  r<   z=Optional[bson.codec_options.CodecOptions[_CodecDocumentType]]r   r   r   rD  r   r   r   rJ  )r   NNNNN)r   rG  r   r   r=   r:  r<   z*Optional[CodecOptions[_CodecDocumentType]]r   r   r   rD  r   rC  r   r   r   rF  )r   rG  r   rB   r   r   r   r   )
r   r+   r   r   r=   r#   r   r   r   r   )NNN)
r   r   r   rA  r   rD  r   r   r   r   )
r   r   r   rA  r   rD  r   r   r   z	list[str])NN)rN   rB   r   r   r   rD  r   r   )
r  -Union[str, AsyncCollection[_DocumentTypeArg]]r   r   r   rD  r   rA  r   r   )FFNNN)r  rK  r   r>  r!  r>  r   r   r"  rE  r   rD  r   r   )
r5  r   r   r   r   rD  r   r   r   zOptional[_DocumentType])-r4   
__module____qualname____firstlineno__r;   propertyrM   rN   r   r[   rd   rg   rk   rp   ry   rw   r~   r   __iter__r   r   r   r   r   applyr   r   r"   r   r   r   r   r   r   r   r  r  r   r  r  r  r,  r6  __static_attributes____classcell__)rO   s   @r7   r0   r0   =   s
   
 CG1504.2K//K/ K/ @	K/
 /K/ .K/ ,K/ 
K/ K/Z      #1403.1 / .	
 , 
&   2503.1: / .	
 , 
)  CG1504.2,
?,
 /,
 .	,

 ,,
 
H,
\
!0J&+ CG1504.24
4
 @4
 /	4

 .4
 ,4
 
(4
l'47AE	$8 HB D
 )-'+48+/$(,07;0437!%59/3A%A %A 2	A
 )A "A *A "5A .A 1A A &3A -A 
2AF [[ CG1504.204'+YY @Y /	Y
 .Y ,Y .Y %Y Y 
(Y Yx LPM!M,HM[^M	*M^ 
 @D'5'='=6K04*/04 6 	
  > % 4 . $( .  
   
 @D'5'='=:=04*/04 6 	
  > % 8 . $( .  
 ( @D'5'='= "04*/04!! 6! 	!
 ! >! %!
! .! $(! .! ! 
3!F  @D15"04!%5  	
 > /  .   
   @D15:=04!%5  	
 > / 8 .   
  [[ @D15W[04!%@5@ @ 	@
 >@ /@ U@ .@ @ @ 
3@ @D [[ 15DH04!%+/fP5fP fP /	fP
 BfP .fP fP )fP fP 
+fP fPX 15	]5] ] .	]
 
]0 . %	
  
6> 15.2!%	,
-,
 ,,
 	,

 ,
 
6,
` 15.2!%	W-W ,W 	W
 W 
6W< 15.2!%	
-
 ,
 	

 
 

6 15.2!%	 U- U , U 	 U
  U 
 UF ae">P]	" [[ 15!%8<K?IK? .K? 	K?
 6K? 
K? K?` 04%)!%RIR R 	R
 .R #R R 
Rn 15!%	(
(
 .(
 	(

 (
 
!(
 (
rQ   r0   )F__doc__
__future__r   copyr   typingr   r   r   r   r	   r
   r   r   r   r   r   bson.codec_optionsr   r   
bson.dbrefr   bson.timestampr   pymongor   r    pymongo.asynchronous.aggregationr   "pymongo.asynchronous.change_streamr   pymongo.asynchronous.collectionr   #pymongo.asynchronous.command_cursorr   pymongo.commonr   r   pymongo.database_sharedr   r   pymongo.errorsr   r    pymongo.operationsr!   pymongo.read_preferencesr"   r#   pymongo.typingsr$   r%   r&   r'   bson#pymongo.asynchronous.client_sessionr(   r@   r*   pymongo.asynchronous.poolr+   pymongo.asynchronous.serverr,   pymongo.read_concernr-   pymongo.write_concernr.   _IS_SYNC
BaseObjectr0   rY   rQ   r7   <module>rn     s    ! "     C  $ ! H H ; B : C > " @ T TFB9202q
F%%w}'= q
rQ   