zmc
2023-08-08 e792e9a60d958b93aef96050644f369feb25d61b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
U
¸ý°d:{ã@sddlmZddlZddlmZddlmZddlmZddlmZddlmZddlm    Z    dd    lm
Z
dd
lm Z d d l m Zd dl mZd dlmZd dlmZd dlmZd dlmZd dlmZd dlmZd dlmZd dlmZd dlmZd dlmZd dlmZd dl m!Z!d dl m"Z"e
rRd dlm#Z#d dlm$Z$d dlm%Z%e ded Z&e d!e    ed"fd Z'Gd#d$„d$eeƒZ(Gd%d&„d&ee(ee'ƒZ)Gd'd(„d(e(eƒZ*Gd)d*„d*ee(eƒZ+Gd+d,„d,e(eej,ƒZ-e d-d.d Z.d-d/d-d0œd1d2„Z/dS)3é)Ú annotationsN)ÚAny)Ú AsyncIterator)ÚOptional)Úoverload)ÚSequence)ÚTuple)Ú TYPE_CHECKING)ÚTypeVaré)Úexcé)Úutil)ÚResult)Ú_NO_ROW)Ú_R)Ú    _WithKeys)Ú FilterResult)Ú FrozenResult)ÚResultMetaData)ÚRow)Ú
RowMapping)Ú _generative)Úgreenlet_spawn)ÚLiteral)ÚSelf)Ú CursorResult)Ú _KeyIndexType)Ú_UniqueFilterTypeÚ_T)ÚboundÚ_TP.c@sBeZdZUdZded<ded<ddœdd    „Zed
dœd d „ƒZd S)Ú AsyncCommon©ú Result[Any]Ú _real_resultrÚ    _metadataÚNone©ÚreturncÃst|jjƒIdHdS)zClose this result.N)rr%Úclose©Úselfr#r#úTd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\sqlalchemy/ext/asyncio/result.pyr*2szAsyncCommon.closeÚboolcCs|jjS)z›proxies the .closed attribute of the underlying result object,
        if any, else raises ``AttributeError``.
 
        .. versionadded:: 2.0.0b3
 
        )r%Úclosedr+r#r#r-r/7szAsyncCommon.closedN)Ú__name__Ú
__module__Ú __qualname__Ú    __slots__Ú__annotations__r*Úpropertyr/r#r#r#r-r",s
r"c@seZdZUdZdZded<ddœdd„Zedd    œd
d „ƒZdd    œd d „Z    e
dVdddœdd„ƒZ dddœdd„Z dWdddœdd„Z dd    œdd„Zd d    œd!d"„ZdXdddœd#d$„Zdd    œd%d&„Zd'd    œd(d)„Zd*d    œd+d,„Zd d    œd-d.„Zd d    œd/d0„Zed1d2d3œd4d5„ƒZed6d    œd7d5„ƒZd6d    œd8d5„Zed1d9d3œd:d;„ƒZed<d    œd=d;„ƒZd<d    œd>d;„Zd*d    œd?d@„Zed1d9d3œdAdB„ƒZed6d    œdCdB„ƒZd6d    œdDdB„ZdEd    œdFdG„Zed1dHdIdJœdKdL„ƒZed1dId3œdMdL„ƒZedYddOdPœdQdL„ƒZdZddOdPœdRdL„ZdSd    œdTdU„ZdS)[Ú AsyncResultalAn asyncio wrapper around a :class:`_result.Result` object.
 
    The :class:`_asyncio.AsyncResult` only applies to statement executions that
    use a server-side cursor.  It is returned only from the
    :meth:`_asyncio.AsyncConnection.stream` and
    :meth:`_asyncio.AsyncSession.stream` methods.
 
    .. note:: As is the case with :class:`_engine.Result`, this object is
       used for ORM results returned by :meth:`_asyncio.AsyncSession.execute`,
       which can yield instances of ORM mapped objects either individually or
       within tuple-like rows.  Note that these result objects do not
       deduplicate instances or rows automatically as is the case with the
       legacy :class:`_orm.Query` object. For in-Python de-duplication of
       instances or rows, use the :meth:`_asyncio.AsyncResult.unique` modifier
       method.
 
    .. versionadded:: 1.4
 
    r#z Result[_TP]r%)Ú real_resultcCs<||_|j|_|j|_d|_d|jkr8| d|jd¡dS)NZ _row_getter)r%r&Ú_unique_filter_stateÚ_post_creational_filterÚ__dict__Z_set_memoized_attribute)r,r7r#r#r-Ú__init__[s
ÿzAsyncResult.__init__zAsyncTupleResult[_TP]r(cCs|S)zåApply a "typed tuple" typing filter to returned rows.
 
        The :attr:`_asyncio.AsyncResult.t` attribute is a synonym for
        calling the :meth:`_asyncio.AsyncResult.tuples` method.
 
        .. versionadded:: 2.0
 
        r#r+r#r#r-Útis
z AsyncResult.tcCs|S)aBApply a "typed tuple" typing filter to returned rows.
 
        This method returns the same :class:`_asyncio.AsyncResult` object
        at runtime,
        however annotates as returning a :class:`_asyncio.AsyncTupleResult`
        object that will indicate to :pep:`484` typing tools that plain typed
        ``Tuple`` instances are returned rather than rows.  This allows
        tuple unpacking and ``__getitem__`` access of :class:`_engine.Row`
        objects to by typed, for those cases where the statement invoked
        itself included typing information.
 
        .. versionadded:: 2.0
 
        :return: the :class:`_result.AsyncTupleResult` type at typing time.
 
        .. seealso::
 
            :attr:`_asyncio.AsyncResult.t` - shorter synonym
 
            :attr:`_engine.Row.t` - :class:`_engine.Row` version
 
        r#r+r#r#r-ÚtuplesuszAsyncResult.tuplesNúOptional[_UniqueFilterType]r©Ústrategyr)cCstƒ|f|_|S)zèApply unique filtering to the objects returned by this
        :class:`_asyncio.AsyncResult`.
 
        Refer to :meth:`_engine.Result.unique` in the synchronous
        SQLAlchemy API for a complete behavioral description.
 
        ©Úsetr8©r,r@r#r#r-Úuniques     zAsyncResult.uniquer©Úcol_expressionsr)cGs
| |¡S)zÆEstablish the columns that should be returned in each row.
 
        Refer to :meth:`_engine.Result.columns` in the synchronous
        SQLAlchemy API for a complete behavioral description.
 
        ©Z_column_slices©r,rFr#r#r-Úcolumns›szAsyncResult.columnsú Optional[int]z!AsyncIterator[Sequence[Row[_TP]]]©Úsizer)cCs,|j}t|||ƒIdH}|r(|Vqq(qdS)aßIterate through sub-lists of rows of the size given.
 
        An async iterator is returned::
 
            async def scroll_results(connection):
                result = await connection.stream(select(users_table))
 
                async for partition in result.partitions(100):
                    print("list of rows: %s" % partition)
 
        Refer to :meth:`_engine.Result.partitions` in the synchronous
        SQLAlchemy API for a complete behavioral description.
 
        N©Ú_manyrow_getterr©r,rLÚgetterÚ    partitionr#r#r-Ú
partitions¤s
zAsyncResult.partitionszSequence[Row[_TP]]cÃst|jƒIdHS)zcA synonym for the :meth:`_asyncio.AsyncResult.all` method.
 
        .. versionadded:: 2.0
 
        N©rZ_allrowsr+r#r#r-Úfetchall¿szAsyncResult.fetchallzOptional[Row[_TP]]cÃs&t|j|ƒIdH}|tkrdS|SdS)aéFetch one row.
 
        When all rows are exhausted, returns None.
 
        This method is provided for backwards compatibility with
        SQLAlchemy 1.x.x.
 
        To fetch the first row of a result only, use the
        :meth:`_asyncio.AsyncResult.first` method.  To iterate through all
        rows, iterate the :class:`_asyncio.AsyncResult` object directly.
 
        :return: a :class:`_engine.Row` object if no filters are applied,
         or ``None`` if no rows remain.
 
        N©rÚ_onerow_getterr©r,Úrowr#r#r-ÚfetchoneÈszAsyncResult.fetchonecÃst|j||ƒIdHS)a›Fetch many rows.
 
        When all rows are exhausted, returns an empty list.
 
        This method is provided for backwards compatibility with
        SQLAlchemy 1.x.x.
 
        To fetch rows in groups, use the
        :meth:`._asyncio.AsyncResult.partitions` method.
 
        :return: a list of :class:`_engine.Row` objects.
 
        .. seealso::
 
            :meth:`_asyncio.AsyncResult.partitions`
 
        N©rrN©r,rLr#r#r-Ú    fetchmanyÞszAsyncResult.fetchmanycÃst|jƒIdHS)zËReturn all rows in a list.
 
        Closes the result set after invocation.   Subsequent invocations
        will return an empty list.
 
        :return: a list of :class:`_engine.Row` objects.
 
        NrSr+r#r#r-Úallõs
zAsyncResult.allzAsyncResult[_TP]cCs|S©Nr#r+r#r#r-Ú    __aiter__szAsyncResult.__aiter__zRow[_TP]cÃs*t|j|ƒIdH}|tkr"tƒ‚n|SdSr^©rrVrÚStopAsyncIterationrWr#r#r-Ú    __anext__szAsyncResult.__anext__cÃst|jdddƒIdHS)a®Fetch the first row or ``None`` if no row is present.
 
        Closes the result set and discards remaining rows.
 
        .. note::  This method returns one **row**, e.g. tuple, by default.
           To return exactly one single scalar value, that is, the first
           column of the first row, use the
           :meth:`_asyncio.AsyncResult.scalar` method,
           or combine :meth:`_asyncio.AsyncResult.scalars` and
           :meth:`_asyncio.AsyncResult.first`.
 
           Additionally, in contrast to the behavior of the legacy  ORM
           :meth:`_orm.Query.first` method, **no limit is applied** to the
           SQL query which was invoked to produce this
           :class:`_asyncio.AsyncResult`;
           for a DBAPI driver that buffers results in memory before yielding
           rows, all rows will be sent to the Python process and all but
           the first row will be discarded.
 
           .. seealso::
 
                :ref:`migration_20_unify_select`
 
        :return: a :class:`_engine.Row` object, or None
         if no rows remain.
 
        .. seealso::
 
            :meth:`_asyncio.AsyncResult.scalar`
 
            :meth:`_asyncio.AsyncResult.one`
 
        FN©rZ _only_one_rowr+r#r#r-Úfirst s"zAsyncResult.firstcÃst|jdddƒIdHS)aæReturn at most one result or raise an exception.
 
        Returns ``None`` if the result has no rows.
        Raises :class:`.MultipleResultsFound`
        if multiple rows are returned.
 
        .. versionadded:: 1.4
 
        :return: The first :class:`_engine.Row` or ``None`` if no row
         is available.
 
        :raises: :class:`.MultipleResultsFound`
 
        .. seealso::
 
            :meth:`_asyncio.AsyncResult.first`
 
            :meth:`_asyncio.AsyncResult.one`
 
        TFNrcr+r#r#r-Ú one_or_none/szAsyncResult.one_or_nonezAsyncResult[Tuple[_T]]r©r,r)cÃsdSr^r#r+r#r#r-Ú
scalar_oneFszAsyncResult.scalar_onercÃsdSr^r#r+r#r#r-rgJscÃst|jdddƒIdHS)a6Return exactly one scalar result or raise an exception.
 
        This is equivalent to calling :meth:`_asyncio.AsyncResult.scalars` and
        then :meth:`_asyncio.AsyncResult.one`.
 
        .. seealso::
 
            :meth:`_asyncio.AsyncResult.one`
 
            :meth:`_asyncio.AsyncResult.scalars`
 
        TNrcr+r#r#r-rgNs ú Optional[_T]cÃsdSr^r#r+r#r#r-Úscalar_one_or_none]szAsyncResult.scalar_one_or_noneú Optional[Any]cÃsdSr^r#r+r#r#r-ricscÃst|jdddƒIdHS)a<Return exactly one scalar result or ``None``.
 
        This is equivalent to calling :meth:`_asyncio.AsyncResult.scalars` and
        then :meth:`_asyncio.AsyncResult.one_or_none`.
 
        .. seealso::
 
            :meth:`_asyncio.AsyncResult.one_or_none`
 
            :meth:`_asyncio.AsyncResult.scalars`
 
        TFNrcr+r#r#r-rigs cÃst|jdddƒIdHS)a‰Return exactly one row or raise an exception.
 
        Raises :class:`.NoResultFound` if the result returns no
        rows, or :class:`.MultipleResultsFound` if multiple rows
        would be returned.
 
        .. note::  This method returns one **row**, e.g. tuple, by default.
           To return exactly one single scalar value, that is, the first
           column of the first row, use the
           :meth:`_asyncio.AsyncResult.scalar_one` method, or combine
           :meth:`_asyncio.AsyncResult.scalars` and
           :meth:`_asyncio.AsyncResult.one`.
 
        .. versionadded:: 1.4
 
        :return: The first :class:`_engine.Row`.
 
        :raises: :class:`.MultipleResultsFound`, :class:`.NoResultFound`
 
        .. seealso::
 
            :meth:`_asyncio.AsyncResult.first`
 
            :meth:`_asyncio.AsyncResult.one_or_none`
 
            :meth:`_asyncio.AsyncResult.scalar_one`
 
        TFNrcr+r#r#r-ÚonevszAsyncResult.onecÃsdSr^r#r+r#r#r-Úscalar•szAsyncResult.scalarcÃsdSr^r#r+r#r#r-rl™scÃst|jdddƒIdHS)a®Fetch the first column of the first row, and close the result set.
 
        Returns ``None`` if there are no rows to fetch.
 
        No validation is performed to test if additional rows remain.
 
        After calling this method, the object is fully closed,
        e.g. the :meth:`_engine.CursorResult.close`
        method will have been called.
 
        :return: a Python scalar value, or ``None`` if no rows remain.
 
        FTNrcr+r#r#r-rlszFrozenResult[_TP]cÃstt|ƒIdHS)aReturn a callable object that will produce copies of this
        :class:`_asyncio.AsyncResult` when invoked.
 
        The callable object returned is an instance of
        :class:`_engine.FrozenResult`.
 
        This is used for result set caching.  The method must be called
        on the result when it has been unconsumed, and calling the method
        will consume the result fully.   When the :class:`_engine.FrozenResult`
        is retrieved from a cache, it can be called any number of times where
        it will produce a new :class:`_engine.Result` object each time
        against its stored set of rows.
 
        .. seealso::
 
            :ref:`do_orm_execute_re_executing` - example usage within the
            ORM to implement a result-set cache.
 
        N)rrr+r#r#r-Úfreeze­szAsyncResult.freezez
Literal[0]zAsyncScalarResult[_T])r,Úindexr)cCsdSr^r#©r,rnr#r#r-ÚscalarsÄszAsyncResult.scalarscCsdSr^r#r+r#r#r-rpÊsrzAsyncScalarResult[Any])rnr)cCsdSr^r#ror#r#r-rpÎscCs t|j|ƒS)a>Return an :class:`_asyncio.AsyncScalarResult` filtering object which
        will return single elements rather than :class:`_row.Row` objects.
 
        Refer to :meth:`_result.Result.scalars` in the synchronous
        SQLAlchemy API for a complete behavioral description.
 
        :param index: integer or row key indicating the column to be fetched
         from each row, defaults to ``0`` indicating the first column.
 
        :return: a new :class:`_asyncio.AsyncScalarResult` filtering object
         referring to this :class:`_asyncio.AsyncResult` object.
 
        )ÚAsyncScalarResultr%ror#r#r-rpÒsÚAsyncMappingResultcCs
t|jƒS)aªApply a mappings filter to returned rows, returning an instance of
        :class:`_asyncio.AsyncMappingResult`.
 
        When this filter is applied, fetching rows will return
        :class:`_engine.RowMapping` objects instead of :class:`_engine.Row`
        objects.
 
        :return: a new :class:`_asyncio.AsyncMappingResult` filtering object
         referring to the underlying :class:`_result.Result` object.
 
        )rrr%r+r#r#r-Úmappingsâs zAsyncResult.mappings)N)N)N)r)r)r0r1r2Ú__doc__r3r4r;r5r<r=rrDrIrRrTrYr\r]r_rbrdrerrgrirkrlrmrprsr#r#r#r-r6Bs\
 
ÿ    ÿ $r6c@sÀeZdZdZdZdZdddœdd„Zd)d
d d œd d„Zd*dddœdd„Zddœdd„Z    d+dddœdd„Z
ddœdd„Z ddœdd„Z ddœd d!„Z d"dœd#d$„Zd"dœd%d&„Zddœd'd(„Zd    S),rqa—A wrapper for a :class:`_asyncio.AsyncResult` that returns scalar values
    rather than :class:`_row.Row` values.
 
    The :class:`_asyncio.AsyncScalarResult` object is acquired by calling the
    :meth:`_asyncio.AsyncResult.scalars` method.
 
    Refer to the :class:`_result.ScalarResult` object in the synchronous
    SQLAlchemy API for a complete behavioral description.
 
    .. versionadded:: 1.4
 
    r#Fr$r)r7rncCsD||_|jr|j|_d|_n|j |g¡|_t d¡|_|j|_dS©Nr)r%Ú_source_supports_scalarsr&r9Ú_reduceÚoperatorÚ
itemgetterr8)r,r7rnr#r#r-r;s zAsyncScalarResult.__init__Nr>rr?cCstƒ|f|_|S)z±Apply unique filtering to the objects returned by this
        :class:`_asyncio.AsyncScalarResult`.
 
        See :meth:`_asyncio.AsyncResult.unique` for usage details.
 
        rArCr#r#r-rDs
zAsyncScalarResult.uniquerJúAsyncIterator[Sequence[_R]]rKcCs,|j}t|||ƒIdH}|r(|Vqq(qdS)zäIterate through sub-lists of elements of the size given.
 
        Equivalent to :meth:`_asyncio.AsyncResult.partitions` except that
        scalar values, rather than :class:`_engine.Row` objects,
        are returned.
 
        NrMrOr#r#r-rRs
zAsyncScalarResult.partitionsú Sequence[_R]r(cÃst|jƒIdHS)z@A synonym for the :meth:`_asyncio.AsyncScalarResult.all` method.NrSr+r#r#r-rT1szAsyncScalarResult.fetchallcÃst|j||ƒIdHS)z¾Fetch many objects.
 
        Equivalent to :meth:`_asyncio.AsyncResult.fetchmany` except that
        scalar values, rather than :class:`_engine.Row` objects,
        are returned.
 
        NrZr[r#r#r-r\6szAsyncScalarResult.fetchmanycÃst|jƒIdHS)zÈReturn all scalar values in a list.
 
        Equivalent to :meth:`_asyncio.AsyncResult.all` except that
        scalar values, rather than :class:`_engine.Row` objects,
        are returned.
 
        NrSr+r#r#r-r]@szAsyncScalarResult.allzAsyncScalarResult[_R]cCs|Sr^r#r+r#r#r-r_JszAsyncScalarResult.__aiter__rcÃs*t|j|ƒIdH}|tkr"tƒ‚n|SdSr^r`rWr#r#r-rbMszAsyncScalarResult.__anext__ú Optional[_R]cÃst|jdddƒIdHS)zâFetch the first object or ``None`` if no object is present.
 
        Equivalent to :meth:`_asyncio.AsyncResult.first` except that
        scalar values, rather than :class:`_engine.Row` objects,
        are returned.
 
        FNrcr+r#r#r-rdTszAsyncScalarResult.firstcÃst|jdddƒIdHS)zÝReturn at most one object or raise an exception.
 
        Equivalent to :meth:`_asyncio.AsyncResult.one_or_none` except that
        scalar values, rather than :class:`_engine.Row` objects,
        are returned.
 
        TFNrcr+r#r#r-re^szAsyncScalarResult.one_or_nonecÃst|jdddƒIdHS)zÕReturn exactly one object or raise an exception.
 
        Equivalent to :meth:`_asyncio.AsyncResult.one` except that
        scalar values, rather than :class:`_engine.Row` objects,
        are returned.
 
        TFNrcr+r#r#r-rkhszAsyncScalarResult.one)N)N)N)r0r1r2rtr3Ú_generate_rowsr;rDrRrTr\r]r_rbrdrerkr#r#r#r-rqòs  þÿ
 
 
 
rqc@sæeZdZdZdZdZe d¡Zddœdd„Z    d.d
d d œd d„Z
dd dœdd„Z d/dddœdd„Z ddœdd„Z ddœdd„Zd0dddœdd „Zddœd!d"„Zddœd#d$„Zd%dœd&d'„Zddœd(d)„Zddœd*d+„Zd%dœd,d-„Zd    S)1rra¡A wrapper for a :class:`_asyncio.AsyncResult` that returns dictionary
    values rather than :class:`_engine.Row` values.
 
    The :class:`_asyncio.AsyncMappingResult` object is acquired by calling the
    :meth:`_asyncio.AsyncResult.mappings` method.
 
    Refer to the :class:`_result.MappingResult` object in the synchronous
    SQLAlchemy API for a complete behavioral description.
 
    .. versionadded:: 1.4
 
    r#TÚ_mappingr$)ÚresultcCs0||_|j|_|j|_|jr,|j dg¡|_dSru)r%r8r&rvrw)r,rr#r#r-r;‡s
zAsyncMappingResult.__init__Nr>rr?cCstƒ|f|_|S)z²Apply unique filtering to the objects returned by this
        :class:`_asyncio.AsyncMappingResult`.
 
        See :meth:`_asyncio.AsyncResult.unique` for usage details.
 
        rArCr#r#r-rDŽs
zAsyncMappingResult.uniquerrEcGs
| |¡S)z:Establish the columns that should be returned in each row.rGrHr#r#r-rI›szAsyncMappingResult.columnsrJz#AsyncIterator[Sequence[RowMapping]]rKcCs,|j}t|||ƒIdH}|r(|Vqq(qdS)zùIterate through sub-lists of elements of the size given.
 
        Equivalent to :meth:`_asyncio.AsyncResult.partitions` except that
        :class:`_engine.RowMapping` values, rather than :class:`_engine.Row`
        objects, are returned.
 
        NrMrOr#r#r-rRŸs
zAsyncMappingResult.partitionszSequence[RowMapping]r(cÃst|jƒIdHS)zAA synonym for the :meth:`_asyncio.AsyncMappingResult.all` method.NrSr+r#r#r-rT³szAsyncMappingResult.fetchallzOptional[RowMapping]cÃs&t|j|ƒIdH}|tkrdS|SdS)zÐFetch one object.
 
        Equivalent to :meth:`_asyncio.AsyncResult.fetchone` except that
        :class:`_engine.RowMapping` values, rather than :class:`_engine.Row`
        objects, are returned.
 
        NrUrWr#r#r-rY¸s    zAsyncMappingResult.fetchonecÃst|j||ƒIdHS)zÐFetch many rows.
 
        Equivalent to :meth:`_asyncio.AsyncResult.fetchmany` except that
        :class:`_engine.RowMapping` values, rather than :class:`_engine.Row`
        objects, are returned.
 
        NrZr[r#r#r-r\Çs zAsyncMappingResult.fetchmanycÃst|jƒIdHS)zÔReturn all rows in a list.
 
        Equivalent to :meth:`_asyncio.AsyncResult.all` except that
        :class:`_engine.RowMapping` values, rather than :class:`_engine.Row`
        objects, are returned.
 
        NrSr+r#r#r-r]Ôs    zAsyncMappingResult.allcCs|Sr^r#r+r#r#r-r_ßszAsyncMappingResult.__aiter__rcÃs*t|j|ƒIdH}|tkr"tƒ‚n|SdSr^r`rWr#r#r-rbâszAsyncMappingResult.__anext__cÃst|jdddƒIdHS)z÷Fetch the first object or ``None`` if no object is present.
 
        Equivalent to :meth:`_asyncio.AsyncResult.first` except that
        :class:`_engine.RowMapping` values, rather than :class:`_engine.Row`
        objects, are returned.
 
        FNrcr+r#r#r-rdészAsyncMappingResult.firstcÃst|jdddƒIdHS)zòReturn at most one object or raise an exception.
 
        Equivalent to :meth:`_asyncio.AsyncResult.one_or_none` except that
        :class:`_engine.RowMapping` values, rather than :class:`_engine.Row`
        objects, are returned.
 
        TFNrcr+r#r#r-reószAsyncMappingResult.one_or_nonecÃst|jdddƒIdHS)zêReturn exactly one object or raise an exception.
 
        Equivalent to :meth:`_asyncio.AsyncResult.one` except that
        :class:`_engine.RowMapping` values, rather than :class:`_engine.Row`
        objects, are returned.
 
        TFNrcr+r#r#r-rkýszAsyncMappingResult.one)N)N)N)r0r1r2rtr3r}rxÚ
attrgetterr9r;rDrIrRrTrYr\r]r_rbrdrerkr#r#r#r-rrss( 
    þ ÿÿ  
 
rrc@sJeZdZdZdZerFd2dddœdd„Zd    d
œd d „Zd d
œdd„Zd3dd dœdd„Z    d d
œdd„Z
dd
œdd„Z dd
œdd„Z d    d
œdd„Z d    d
œdd„Zdd
œdd„Zed d!d"œd#d$„ƒZed%d
œd&d$„ƒZd%d
œd'd$„Zed d(d"œd)d*„ƒZed+d
œd,d*„ƒZd+d
œd-d*„Zed d(d"œd.d/„ƒZed%d
œd0d/„ƒZd%d
œd1d/„ZdS)4ÚAsyncTupleResultaA :class:`_asyncio.AsyncResult` that's typed as returning plain
    Python tuples instead of rows.
 
    Since :class:`_engine.Row` acts like a tuple in every way already,
    this class is a typing only class, regular :class:`_asyncio.AsyncResult` is
    still used at runtime.
 
    r#NrJrzrKcÃsdS)zíIterate through sub-lists of elements of the size given.
 
            Equivalent to :meth:`_result.Result.partitions` except that
            tuple values, rather than :class:`_engine.Row` objects,
            are returned.
 
            Nr#r[r#r#r-rRs
zAsyncTupleResult.partitionsr|r(cÃsdS)zÃFetch one tuple.
 
            Equivalent to :meth:`_result.Result.fetchone` except that
            tuple values, rather than :class:`_engine.Row`
            objects, are returned.
 
            Nr#r+r#r#r-rY"szAsyncTupleResult.fetchoner{cÃsdS)z:A synonym for the :meth:`_engine.ScalarResult.all` method.Nr#r+r#r#r-rT,szAsyncTupleResult.fetchallcÃsdS)zÇFetch many objects.
 
            Equivalent to :meth:`_result.Result.fetchmany` except that
            tuple values, rather than :class:`_engine.Row` objects,
            are returned.
 
            Nr#r[r#r#r-r\0szAsyncTupleResult.fetchmanycÃsdS)zÑReturn all scalar values in a list.
 
            Equivalent to :meth:`_result.Result.all` except that
            tuple values, rather than :class:`_engine.Row` objects,
            are returned.
 
            Nr#r+r#r#r-r]:szAsyncTupleResult.allzAsyncIterator[_R]cÃsdSr^r#r+r#r#r-r_DszAsyncTupleResult.__aiter__rcÃsdSr^r#r+r#r#r-rbGszAsyncTupleResult.__anext__cÃsdS)zìFetch the first object or ``None`` if no object is present.
 
            Equivalent to :meth:`_result.Result.first` except that
            tuple values, rather than :class:`_engine.Row` objects,
            are returned.
 
 
            Nr#r+r#r#r-rdJs    zAsyncTupleResult.firstcÃsdS)zæReturn at most one object or raise an exception.
 
            Equivalent to :meth:`_result.Result.one_or_none` except that
            tuple values, rather than :class:`_engine.Row` objects,
            are returned.
 
            Nr#r+r#r#r-reUszAsyncTupleResult.one_or_nonecÃsdS)zÞReturn exactly one object or raise an exception.
 
            Equivalent to :meth:`_result.Result.one` except that
            tuple values, rather than :class:`_engine.Row` objects,
            are returned.
 
            Nr#r+r#r#r-rk_szAsyncTupleResult.onezAsyncTupleResult[Tuple[_T]]rrfcÃsdSr^r#r+r#r#r-rgiszAsyncTupleResult.scalar_onercÃsdSr^r#r+r#r#r-rgmscÃsdS)a6Return exactly one scalar result or raise an exception.
 
            This is equivalent to calling :meth:`_engine.Result.scalars`
            and then :meth:`_engine.Result.one`.
 
            .. seealso::
 
                :meth:`_engine.Result.one`
 
                :meth:`_engine.Result.scalars`
 
            Nr#r+r#r#r-rgqs rhcÃsdSr^r#r+r#r#r-ri€sz#AsyncTupleResult.scalar_one_or_nonerjcÃsdSr^r#r+r#r#r-ri†scÃsdS)a6Return exactly one or no scalar result.
 
            This is equivalent to calling :meth:`_engine.Result.scalars`
            and then :meth:`_engine.Result.one_or_none`.
 
            .. seealso::
 
                :meth:`_engine.Result.one_or_none`
 
                :meth:`_engine.Result.scalars`
 
            Nr#r+r#r#r-riŠs cÃsdSr^r#r+r#r#r-rl™szAsyncTupleResult.scalarcÃsdSr^r#r+r#r#r-rlscÃsdS)a×Fetch the first column of the first row, and close the result
            set.
 
            Returns ``None`` if there are no rows to fetch.
 
            No validation is performed to test if additional rows remain.
 
            After calling this method, the object is fully closed,
            e.g. the :meth:`_engine.CursorResult.close`
            method will have been called.
 
            :return: a Python scalar value , or ``None`` if no rows remain.
 
            Nr#r+r#r#r-rl¡s)N)N)r0r1r2rtr3r    rRrYrTr\r]r_rbrdrerkrrgrirlr#r#r#r-rs:    ÿ 
 
 
 
 
rÚ_RTr$r)rÚcalling_methodr)cÃs|z
|j}Wntk
r"|YSX|s6t|ddƒ}n|}|rx|jjrxt|jƒIdHt d|j    j
j |j |j    j
j f¡‚|S)NÚrawzuCan't use the %s.%s() method with a server-side cursor. Use the %s.stream() method for an async streaming result set.) Z
_is_cursorÚAttributeErrorÚgetattrÚcontextZ_is_server_siderr*Ú    async_excZAsyncMethodRequiredÚ__self__Ú    __class__r0)rrƒZ    is_cursorZ cursor_resultr#r#r-Ú_ensure_sync_result¶s$
 
 ýüÿ r‹)0Ú
__future__rrxÚtypingrrrrrrr    r
Úr rˆrZenginerZ engine.resultrrrrrrZ
engine.rowrrZsql.baserZutil.concurrencyrZ util.typingrrrrrrr!r"r6rqrrZ
TypingOnlyrr‚r‹r#r#r#r-Ú<module>sV                            3,