@@ -147,6 +147,7 @@ cdef class BaseProtocol(CoreProtocol):
147
147
self .is_reading = False
148
148
self .transport.pause_reading()
149
149
150
+ @cython.iterable_coroutine
150
151
async def prepare(self , stmt_name, query, timeout,
151
152
PreparedStatementState state = None ):
152
153
if self .cancel_waiter is not None :
@@ -171,6 +172,7 @@ cdef class BaseProtocol(CoreProtocol):
171
172
finally :
172
173
return await waiter
173
174
175
+ @cython.iterable_coroutine
174
176
async def bind_execute(self , PreparedStatementState state, args,
175
177
str portal_name, int limit, return_extra,
176
178
timeout):
@@ -203,6 +205,7 @@ cdef class BaseProtocol(CoreProtocol):
203
205
finally :
204
206
return await waiter
205
207
208
+ @cython.iterable_coroutine
206
209
async def bind_execute_many(self , PreparedStatementState state, args,
207
210
str portal_name, timeout):
208
211
@@ -238,6 +241,7 @@ cdef class BaseProtocol(CoreProtocol):
238
241
finally :
239
242
return await waiter
240
243
244
+ @cython.iterable_coroutine
241
245
async def bind(self , PreparedStatementState state, args,
242
246
str portal_name, timeout):
243
247
@@ -266,6 +270,7 @@ cdef class BaseProtocol(CoreProtocol):
266
270
finally :
267
271
return await waiter
268
272
273
+ @cython.iterable_coroutine
269
274
async def execute(self , PreparedStatementState state,
270
275
str portal_name, int limit, return_extra,
271
276
timeout):
@@ -295,6 +300,7 @@ cdef class BaseProtocol(CoreProtocol):
295
300
finally :
296
301
return await waiter
297
302
303
+ @cython.iterable_coroutine
298
304
async def query(self , query, timeout):
299
305
if self .cancel_waiter is not None :
300
306
await self .cancel_waiter
@@ -319,6 +325,7 @@ cdef class BaseProtocol(CoreProtocol):
319
325
finally :
320
326
return await waiter
321
327
328
+ @cython.iterable_coroutine
322
329
async def copy_out(self , copy_stmt, sink, timeout):
323
330
if self .cancel_waiter is not None :
324
331
await self .cancel_waiter
@@ -373,6 +380,7 @@ cdef class BaseProtocol(CoreProtocol):
373
380
374
381
return status_msg
375
382
383
+ @cython.iterable_coroutine
376
384
async def copy_in(self , copy_stmt, reader, data,
377
385
records, PreparedStatementState record_stmt, timeout):
378
386
cdef:
@@ -491,6 +499,7 @@ cdef class BaseProtocol(CoreProtocol):
491
499
492
500
return status_msg
493
501
502
+ @cython.iterable_coroutine
494
503
async def close_statement(self , PreparedStatementState state, timeout):
495
504
if self .cancel_waiter is not None :
496
505
await self .cancel_waiter
@@ -530,6 +539,7 @@ cdef class BaseProtocol(CoreProtocol):
530
539
self ._terminate()
531
540
self .transport.abort()
532
541
542
+ @cython.iterable_coroutine
533
543
async def close(self , timeout):
534
544
if self .closing:
535
545
return
@@ -651,6 +661,7 @@ cdef class BaseProtocol(CoreProtocol):
651
661
self .cancel_sent_waiter is not None
652
662
)
653
663
664
+ @cython.iterable_coroutine
654
665
async def _wait_for_cancellation(self ):
655
666
if self .cancel_sent_waiter is not None :
656
667
await self .cancel_sent_waiter
0 commit comments