+
    8i                    f    R t ^ RIHt ^ RIHt ^ RIHtHtHt ^ RI	H
t
Ht ^ RIHt  ! R R4      tR# )	z@Tools for manipulating DBRefs (references to MongoDB documents).)annotations)deepcopy)AnyMappingOptional)_getstate_slots_setstate_slots)SONc                      ] tR t^tRtRt]t]t	^dt
RR R llt]R R l4       t]R R l4       t]R	 R
 l4       tR R ltR R ltR R ltR R ltR R ltR R ltR R ltRtR# )DBRefz,A reference to a document stored in MongoDB.Nc               0    V ^8  d   QhRRRRRRRRR	RR
R/# )   
collectionstridr   databaseOptional[str]_extrazOptional[Mapping[str, Any]]kwargsreturnNone )formats   "H/var/www/html/photoedit/myenv/lib/python3.14/site-packages/bson/dbref.py__annotate__DBRef.__annotate__"   sF     ! !! !  	!
 ,! ! 
!    c                (   \        V\        4      '       g   \        R\        V4       24      hVe.   \        V\        4      '       g   \        R\        V4       24      hWn        W n        W0n        TP                  T;'       g    / 4       WPn        R# )a  Initialize a new :class:`DBRef`.

Raises :class:`TypeError` if `collection` or `database` is not
an instance of :class:`str`. `database` is optional and allows
references to documents to work across databases. Any additional
keyword arguments will create additional fields in the resultant
embedded document.

:param collection: name of the collection the document is stored in
:param id: the value of the document's ``"_id"`` field
:param database: name of the database to reference
:param kwargs: additional keyword arguments will
    create additional, custom fields

.. seealso:: The MongoDB documentation on `dbrefs <https://dochub.mongodb.org/core/dbrefs>`_.
z+collection must be an instance of str, not Nz)database must be an instance of str, not )	
isinstancer   	TypeErrortype_DBRef__collection
_DBRef__id_DBRef__databaseupdate_DBRef__kwargs)selfr   r   r   r   r   s   &&&&&,r   __init__DBRef.__init__"   s{    0 *c**I$zJZI[\]]
8S(A(AGXGWXYY&	"fll#r   c                   V ^8  d   QhRR/# r   r   r   r   )r   s   "r   r   r   F   s     ! !C !r   c                    V P                   # )z(Get the name of this DBRef's collection.)r!   r&   s   &r   r   DBRef.collectionE   s        r   c                   V ^8  d   QhRR/# )r   r   r   r   )r   s   "r   r   r   K   s      C r   c                    V P                   # )zGet this DBRef's _id.)r"   r,   s   &r   r   DBRef.idJ   s     yyr   c                   V ^8  d   QhRR/# )r   r   r   r   )r   s   "r   r   r   P   s      - r   c                    V P                   # )z_Get the name of this DBRef's database.

Returns None if this DBRef doesn't specify a database.
)r#   r,   s   &r   r   DBRef.databaseO   s     r   c                    V ^8  d   QhRRRR/# )r   keyr   r   r   )r   s   "r   r   r   W   s     0 0s 0s 0r   c                	`     V P                   V,          #   \         d    \        T4      R hi ; iN)r%   KeyErrorAttributeError)r&   r5   s   &&r   __getattr__DBRef.__getattr__W   s2    	0==%% 	0 %4/	0s    -c                   V ^8  d   QhRR/# )r   r   zSON[str, Any]r   )r   s   "r   r   r   ]   s     	 	 	r   c                    \        RV P                  3RV P                  3.4      pV P                  e   V P                  VR&   VP	                  V P
                  4       V# )zcGet the SON document representation of this DBRef.

Generally not needed by application developers
z$refz$idz$db)r	   r   r   r   r$   r%   )r&   docs   & r   as_docDBRef.as_doc]   sQ    
 FDOO,udgg.>?@==$CJ

4==!
r   c                   V ^8  d   QhRR/# r*   r   )r   s   "r   r   r   h   s     T T# Tr   c           
     	R   R P                  V P                  P                  4        UUu. uF  w  rRV RV: 2NK  	  upp4      pV P                  f"   RV P                  : RV P
                  : V R2# RV P                  : RV P
                  : RV P                  : V R2# u uppi ) z, =zDBRef())joinr%   itemsr   r   r   )r&   kvextras   &   r   __repr__DBRef.__repr__h   s    DMM4G4G4IJ4IDA2aS!4IJK== DOO.bE7!DD*"TWWKr$--9J5'QRSS Ks   B#
c                    V ^8  d   QhRRRR/# r   otherr   r   boolr   )r   s   "r   r   r   n   s      C D r   c                	    \        V\        4      '       da   V P                  V P                  V P                  V P
                  3pVP                  VP                  VP                  VP
                  3pW#8H  # \        # r7   )r   r   r#   r!   r"   r%   NotImplemented)r&   rO   usthems   &&  r   __eq__DBRef.__eq__n   s_    eU##//4#4#4diiOB$$e&8&8%**ennUD:r   c                    V ^8  d   QhRRRR/# rN   r   )r   s   "r   r   r   u   s     ! !C !D !r   c                	    W8X  * # r7   r   )r&   rO   s   &&r   __ne__DBRef.__ne__u   s      r   c                   V ^8  d   QhRR/# )r   r   intr   )r   s   "r   r   r   x   s     
 
# 
r   c                    \        V P                  V P                  V P                  \	        \        V P                  P                  4       4      4      34      # )z)Get a hash value for this :class:`DBRef`.)hashr!   r"   r#   tuplesortedr%   rG   r,   s   &r   __hash__DBRef.__hash__x   s@    		4??E&I\I\I^B_<`a
 	
r   c                    V ^8  d   QhRRRR/# )r   memor   r   r   r   )r   s   "r   r   r   ~   s     
 
 
 
r   c           	         \        \        V P                  V4      \        V P                  V4      \        V P                  V4      \        V P
                  V4      4      # )z'Support function for `copy.deepcopy()`.)r   r   r!   r"   r#   r%   )r&   rd   s   &&r   __deepcopy__DBRef.__deepcopy__~   sI    T&&-TYY%T__d+T]]D)	
 	
r   )__collection
__database__id__kwargs)rh   rj   ri   rk   )NN)__name__
__module____qualname____firstlineno____doc__	__slots__r   __getstate__r   __setstate___type_markerr'   propertyr   r   r   r:   r?   rK   rU   rY   ra   rf   __static_attributes__r   r   r   r   r      s    6@I"L"LL!F ! !    0	T!

 
r   r   N)rp   
__future__r   copyr   typingr   r   r   bson._helpersr   r   bson.sonr	   r   r   r   r   <module>r|      s)    G "  ) ) : l
 l
r   