;c PddlZddlmZmZmZmZmZmZerddlm Z GddZ y)N) TYPE_CHECKINGAny AsyncIteratorIterableOptionalTuple) ConnectionceZdZdddejddfdZdeejfdZdZ d Z dd e d e e ddfd Zd e d e e e ddfd Zde ddfdZdeejfdZddede ejfdZde ejfdZddZedefdZedefdZedefdZej6deddfdZedeefdZedej<fdZdZ dZ!y) Cursorconnr cursorreturnNcB|j|_||_||_yN)_iter_chunk_sizeiter_chunk_size_conn_cursor)selfr rs 2/usr/lib/python3/dist-packages/aiosqlite/cursor.py__init__zCursor.__init__ s#44  c"|jS)z+The cursor proxy is also an async iterator.)_fetch_chunkedrs r __aiter__zCursor.__aiter__s""$$rcvK |j|jd{}|sy|D]}| 37wr) fetchmanyr)rrowsrows rrzCursor._fetch_chunkedsB(<(<==D    =s 979c^K|jj|g|i|d{S7w)z=Execute the given function on the shared connection's thread.N)r_execute)rfnargskwargss rr#zCursor._executes-(TZZ((=d=f====s $-+-sql parameterscxK|g}|j|jj||d{|S7w)zExecute the given query.N)r#rexecuterr'r(s rr*zCursor.execute!s<  JmmDLL00#zBBB  Cs /:8:cpK|j|jj||d{|S7w)zExecute the given multiquery.N)r#r executemanyr+s rr-zCursor.executemany(s3mmDLL44c:FFF  Gs +646 sql_scriptcnK|j|jj|d{|S7w)zExecute a user script.N)r#r executescript)rr.s rr0zCursor.executescript/s/mmDLL66 CCC  Ds *535chK|j|jjd{S7w)zFetch a single row.N)r#rfetchoners rr2zCursor.fetchone4%]]4<<#8#89999 )202sizeczKd}||f}|j|jjg|d{S7w)z.Fetch up to `cursor.arraysize` number of rows.N)r#rr)rr5r%s rrzCursor.fetchmany8s> "  7D"T]]4<<#9#9ADAAAAs 2;9;chK|j|jjd{S7w)zFetch all remaining rows.N)r#rfetchallrs rr9zCursor.fetchall?r3r4cjK|j|jjd{y7w)zClose the cursor.N)r#rclosers rr;z Cursor.closeCs"mmDLL..///s )313c.|jjSr)rrowcountrs rr=zCursor.rowcountGs||$$$rc.|jjSr)r lastrowidrs rr?zCursor.lastrowidK||%%%rc.|jjSrr arraysizers rrCzCursor.arraysizeOr@rvaluec&||j_yrrB)rrDs rrCzCursor.arraysizeSs!& rc.|jjSr)r descriptionrs rrGzCursor.descriptionWs||'''rc.|jjSr)r connectionrs rrIzCursor.connection[s||&&&rcK|Swrr7rs r __aenter__zCursor.__aenter___s  sc@K|jd{y7wr)r;)rexc_typeexc_valexc_tbs r __aexit__zCursor.__aexit__bsjjls r)rN)"__name__ __module__ __qualname__sqlite3r rrRowrrr#strrrr*r-r0rr2intrr9r;propertyr=r?rCsetterrrGr rIrKrPr7rrr r s\7>>d %=5%>(3-8$,Xc]$; ch : 5:BCB8GKK3HB: 5:0%#%%&3&&&3&&'s't''(U5\(('G..''rr ) rTtypingrrrrrrcorer r r7rrr\s"OO XXr