+
    8i.                      a  0 t $ R t^ RIHt ^ RIHtHtHtHtH	t	 ^ RI
HtHt ^ RIHt ^ RIHtHtHt ]'       d   ^ RIHt ^ tR]R&   ^tR]R	&   ^tR]R
&   ^tR]R&   ^@tR]R&   RtR]R&    ! R R4      tR R ltR R ltR# )zKConstants, types, and classes shared across Bulk Write API implementations.)annotations)TYPE_CHECKINGAnyMappingMutableMappingNoReturn)BulkWriteErrorOperationFailure)_get_wce_doc)_DELETE_INSERT_UPDATE)_DocumentOutint_DELETE_ALL_DELETE_ONE
_BAD_VALUE_UNKNOWN_ERROR_WRITE_CONCERN_ERRORztuple[str, str, str]	_COMMANDSc                  >    ] tR t^,tRtR R ltR R ltR R ltRtR	# )
_Runz'Represents a batch of write operations.c                    V ^8  d   QhRRRR/# )   op_typer   returnNone )formats   "Q/var/www/html/photoedit/myenv/lib/python3.14/site-packages/pymongo/bulk_shared.py__annotate___Run.__annotate__/   s     ! ! ! !    c                <    Wn         . V n        . V n        ^ V n        R# )zInitialize a new Run object.N)r   	index_mapops
idx_offset)selfr   s   &&r   __init___Run.__init__/   s    #$&  r"   c                    V ^8  d   QhRRRR/# )r   idxr   r   r   )r   s   "r   r    r!   6   s     # # # #r"   c                (    V P                   V,          # )zpGet the original index of an operation in this run.

:param idx: The Run index that maps to the original index.
)r$   )r'   r+   s   &&r   index
_Run.index6   s    
 ~~c""r"   c               $    V ^8  d   QhRRRRRR/# )r   original_indexr   	operationr   r   r   r   )r   s   "r   r    r!   =   s!     # ## ## #$ #r"   c                r    V P                   P                  V4       V P                  P                  V4       R# )zAdd an operation to this Run instance.

:param original_index: The original index of this operation
    within a larger bulk operation.
:param operation: The operation document.
N)r$   appendr%   )r'   r0   r1   s   &&&r   add_Run.add=   s&     	n-	"r"   )r&   r$   r   r%   N)	__name__
__module____qualname____firstlineno____doc__r(   r-   r4   __static_attributes__r   r"   r   r   r   ,   s    1!## #r"   r   c          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )r   runr   full_resultzMutableMapping[str, Any]offsetr   resultzMapping[str, Any]r   r   r   )r   s   "r   r    r    H   s:     )6 )6	)6))6 )6 	)6
 
)6r"   c                   VP                  R^ 4      pV P                  \        8X  d   VR;;,          V,          uu&   EM	V P                  \        8X  d   VR;;,          V,          uu&   MV P                  \        8X  d   VP                  R4      pV'       d   \        V4      pV F%  pV P                  VR,          V,           4      VR&   K'  	  VR,          P                  V4       VR;;,          V,          uu&   VR;;,          WF,
          ,          uu&   MVR;;,          V,          uu&   VR;;,          VR,          ,          uu&   VP                  R	4      pV'       dl   V Fe  pVP                  4       p	VR,          V,           p
V P                  V
4      V	R&   V P                  V
,          V	R
&   VR	,          P                  V	4       Kg  	  \        V4      pV'       d   VR,          P                  V4       R# R# )z7Merge a write command result into the full bulk result.n	nInsertednRemovedupsertedr-   	nUpsertednMatched	nModifiedwriteErrorsopwriteConcernErrorsN)getr   r   r   r   lenr-   extendcopyr%   r3   r
   )r=   r>   r?   r@   affectedrE   
n_upserteddocwrite_errorsreplacementr+   wces   &&&&        r   _merge_commandrV   H   s    zz#q!H
{{gK H, 		J8+		::j)XJ"yyW)>?G  
#**84$
2$
#x'<<#
#x/#K F;$77 ::m,LC((*Kg,'C#&99S>K  #K&--k:   v
C
()005 r"   c                    V ^8  d   QhRRRR/# )r   r>   r   r   r   r   )r   s   "r   r    r    t   s     & & &( &r"   c                   V R,          '       di   V R,          P                  R R7       V R,          ^ ,          pVR,          pVR,          pV^8X  d&   VP                  R4      '       d   Rp\        WBV 4      h\        V 4      h)z5Raise a BulkWriteError from the full bulk api result.rI   c                    V R ,          # )r-   r   )errors   &r   <lambda>)_raise_bulk_write_error.<locals>.<lambda>x   s    %.r"   )keycodeerrmsgzTransaction numberszrThis MongoDB deployment does not support retryable writes. Please add retryWrites=false to your connection string.)sort
startswithr	   r   )r>   errr^   msgr_   s   &    r   _raise_bulk_write_errorrd   t   s     =!!M"'',H'I-(+6{(m2:#..)>??- 
 #6==

%%r"   N)insertupdatedelete)__conditional_annotations__r:   
__future__r   typingr   r   r   r   r   pymongo.errorsr   r	   pymongo.helpers_sharedr
   pymongo.messager   r   r   pymongo.typingsr   r   __annotations__r   r   r   r   r   r   rV   rd   )rh   s   @r   <module>rp      s     R " H H ; /  , S S  
C   c "@	 @# #8)6X&r"   