
    i                     b    S SK r S SKJrJr  S SKJrJrJrJr  \(       a  SSK	J
r
   " S S5      rg)    N)AsyncIteratorIterable)AnyCallableOptionalTYPE_CHECKING   )
Connectionc                      \ rS rSrSSS\R
                  SS4S jrS\\R                     4S jr	S	 r
S
 r S$S\S\\\      SS 4S jjrS\S\\\      SS 4S jrS\SS 4S jrS\\R                     4S jrS$S\\   S\\R                     4S jjrS\\R                     4S jrS%S jr\S\4S j5       r\S\\   4S j5       r\S\4S j5       r\R8                  S\SS4S j5       r\S\\\SSSSSS4   S4   4S j5       r\S\\\R
                  \R                  /\ 4      4S j5       r!\!R8                  S\\"   SS4S j5       r!\S\RF                  4S  j5       r$S! r%S" r&S#r'g)&Cursor   connr
   cursorreturnNc                 >    UR                   U l        Xl        X l        g N)_iter_chunk_sizeiter_chunk_size_conn_cursor)selfr   r   s      J/home/james-whalen/.local/lib/python3.13/site-packages/aiosqlite/cursor.py__init__Cursor.__init__   s    #44
    c                 "    U R                  5       $ )z+The cursor proxy is also an async iterator.)_fetch_chunkedr   s    r   	__aiter__Cursor.__aiter__   s    ""$$r   c                   #     U R                  U R                  5      I S h  vN nU(       d  g U H  nU7v   M
     M;   N7fr   )	fetchmanyr   )r   rowsrows      r   r   Cursor._fetch_chunked   s<     (<(<==D	 	 =s    A?Ac                 ^   #    U R                   R                  " U/UQ70 UD6I Sh  vN $  N7f)z=Execute the given function on the shared connection's thread.N)r   _execute)r   fnargskwargss       r   r'   Cursor._execute   s*     ZZ((=d=f====s   $-+-sql
parametersc                 x   #    Uc  / nU R                  U R                  R                  X5      I Sh  vN   U $  N7f)zExecute the given query.N)r'   r   executer   r,   r-   s      r   r/   Cursor.execute"   s;      JmmDLL00#BBB 	Cs   /:8:c                 n   #    U R                  U R                  R                  X5      I Sh  vN   U $  N7f)zExecute the given multiquery.N)r'   r   executemanyr0   s      r   r3   Cursor.executemany+   s0      mmDLL44cFFF 	G   *535
sql_scriptc                 n   #    U R                  U R                  R                  U5      I Sh  vN   U $  N7f)zExecute a user script.N)r'   r   executescript)r   r6   s     r   r8   Cursor.executescript2   s.     mmDLL66
CCC 	Dr5   c                 h   #    U R                  U R                  R                  5      I Sh  vN $  N7f)zFetch a single row.N)r'   r   fetchoner   s    r   r;   Cursor.fetchone7   $     ]]4<<#8#89999   )202sizec                 |   #    SnUb  U4nU R                   " U R                  R                  /UQ76 I Sh  vN $  N7f)z.Fetch up to `cursor.arraysize` number of rows. N)r'   r   r"   )r   r?   r)   s      r   r"   Cursor.fetchmany;   s;      "7D]]4<<#9#9ADAAAAs   3<:<c                 h   #    U R                  U R                  R                  5      I Sh  vN $  N7f)zFetch all remaining rows.N)r'   r   fetchallr   s    r   rD   Cursor.fetchallB   r=   r>   c                 j   #    U R                  U R                  R                  5      I Sh  vN   g N7f)zClose the cursor.N)r'   r   closer   s    r   rG   Cursor.closeF   s!     mmDLL..///s   )313c                 .    U R                   R                  $ r   )r   rowcountr   s    r   rJ   Cursor.rowcountJ   s    ||$$$r   c                 .    U R                   R                  $ r   )r   	lastrowidr   s    r   rM   Cursor.lastrowidN       ||%%%r   c                 .    U R                   R                  $ r   r   	arraysizer   s    r   rR   Cursor.arraysizeR   rO   r   valuec                 $    XR                   l        g r   rQ   )r   rT   s     r   rR   rS   V   s    !&r   .c                 .    U R                   R                  $ r   )r   descriptionr   s    r   rW   Cursor.descriptionZ       ||'''r   c                 .    U R                   R                  $ r   r   row_factoryr   s    r   r\   Cursor.row_factory^   rY   r   factoryc                 $    XR                   l        g r   r[   )r   r^   s     r   r\   r]   b   s    #* r   c                 .    U R                   R                  $ r   )r   
connectionr   s    r   ra   Cursor.connectionf   s    ||&&&r   c                    #    U $ 7fr   rA   r   s    r   
__aenter__Cursor.__aenter__j   s
     s   c                 @   #    U R                  5       I S h  vN   g  N7fr   )rG   )r   exc_typeexc_valexc_tbs       r   	__aexit__Cursor.__aexit__m   s     jjls   )r   r   r   r   )r   N)(__name__
__module____qualname____firstlineno__sqlite3r   r   r   Rowr   r   r'   strr   r   r   r/   r3   r8   r;   intr"   rD   rG   propertyrJ   rM   rR   settertuplerW   r   objectr\   typer
   ra   rd   rj   __static_attributes__rA   r   r   r   r      s;   \ 7>> d 
%=5 %>
 ?C$,Xc]$;	$,Xc]$;	c h 
: 5 :BHSM BXgkk=R B: 5 :0 %# % % &8C= & & &3 & & 's 't ' ' (U5dD$dD)P#QSV#VW ( ( (Xh/Lf/T&UV ( ( +8D> +d + + 'G.. ' 'r   r   )rp   collections.abcr   r   typingr   r   r   r   corer
   r   rA   r   r   <module>r}      s%     3 9 9 b br   