https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/boto/dynamodb2/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/boto/dynamodb2/__pycache__/results.cpython-310.pyc
o

ckF[��@s$Gdd�de�ZGdd�de�ZdS)csZeZdZdZd�fdd�	Zedd��Zdd�Zd	d
�Zdd�Z	e	Z
d
d�Zdd�Z�Z
S)�	ResultSeta�
    A class used to lazily handle page-to-page navigation through a set of
    results.

    It presents a transparent iterator interface, so that all the user has
    to do is use it in a typical ``for`` loop (or list comprehension, etc.)
    to fetch results, even if they weren't present in the current page of
    results.

    This is used by the ``Table.query`` & ``Table.scan`` methods.

    Example::

        >>> users = Table('users')
        >>> results = ResultSet()
        >>> results.to_call(users.query, username__gte='johndoe')
        # Now iterate. When it runs out of results, it'll fetch the next page.
        >>> for res in results:
        ...     print res['username']

    NcsNtt|���d|_g|_i|_g|_d|_d|_d|_	d|_
||_d|_dS)N���T�)
�superr�__init__�the_callable�	call_args�call_kwargs�_results�_offset�
_results_left�_last_key_seen�_fetches�_max_page_size�_limit)�self�
max_page_size��	__class__��8/usr/lib/python3/dist-packages/boto/dynamodb2/results.pyrs
zResultSet.__init__cCsdS)N�exclusive_start_keyr�rrrr�	first_key$szResultSet.first_keycCsg|_d|_dS)z�
        Resets the internal state of the ``ResultSet``.

        This prevents results from being cached long-term & consuming
        excess memory.

        Largely internal.
        rN)r	r
rrrr�_reset(s	
zResultSet._resetcCs|S�Nrrrrr�__iter__4szResultSet.__iter__cCs�|jd7_|jt|j�kr/|jdurt��|��t|j�s/|jr/|��t|j�s/|js#|jt|j�krQ|jdurK|jd8_|jdkrKt��|j|jSt��)N�Fr)r
�lenr	r�
StopIteration�
fetch_morerrrrr�__next__7s
�

zResultSet.__next__cOsNt|�std��|�dd�|_|jdur|jdkrd|_||_||_||_dS)a�
        Sets up the callable & any arguments to run it with.

        This is stored for subsequent calls so that those queries can be
        run without requiring user intervention.

        Example::

            # Just an example callable.
            >>> def squares_to(y):
            ...     for x in range(1, y):
            ...         yield x**2
            >>> rs = ResultSet()
            # Set up what to call & arguments.
            >>> rs.to_call(squares_to, y=3)

        z3You must supply an object or function to be called.�limitNr)�callable�
ValueError�poprrrr)rr�args�kwargsrrr�to_callSs�
zResultSet.to_callcCs |��|jdd�}|j��}|jdur|j||j<|jr+|jr+|j|jkr+|j|_|jdur6|j|d<n
|jdur@|j|d<|j|i|��}|j	d7_	|�
dg�}|�
dd�|_t|�rh|j�
|d�|jdur�|jdkr�|j}|t|d�8}|dkr�d|_|jdur�d|_dSdS)z�
        When the iterator runs out of results, this method is run to re-execute
        the callable (& arguments) to fetch the next page.

        Largely internal.
        Nr!r�results�last_keyrF)rrr�copyrrrrrr
�getrr	�extendr)rr%r&r(�new_resultsr!rrrrvs2






�zResultSet.fetch_morer)�__name__�
__module__�__qualname__�__doc__r�propertyrrrr �nextr'r�
__classcell__rrrrrs
#rcs$eZdZ�fdd�Zdd�Z�ZS)�BatchGetResultSetcs6|�dg�|_|�dd�|_tt|�j|i|��dS)N�keys�
max_batch_get�d)r$�
_keys_left�_max_batch_getrr5r)rr%r&rrrr�szBatchGetResultSet.__init__cCs�|��|jdd�}|j��}|jd|j�|d<|j|jd�|_t|j�dkr-d|_|j|i|��}t|�	dg��s?dS|j
�|d�t|�	dg��D]\}}|j�
||�qOt|j�dkred|_|j�	d�rz|jdt|d�8<dSdS)Nr6rFr(�unprocessed_keysTr!)rrrr*r9r:rrrr+r	r,�	enumerate�insert)rr%r&r(�offset�key_datarrrr�s$
�zBatchGetResultSet.fetch_more)r.r/r0rrr4rrrrr5�sr5N)�objectrr5rrrr�<module>s'

https://t.me/RX1948 - 2025