@@ -147,6 +147,7 @@ cdef class BaseProtocol(CoreProtocol):
147147 self .is_reading = False
148148 self .transport.pause_reading()
149149
150+ @cython.iterable_coroutine
150151 async def prepare(self , stmt_name, query, timeout,
151152 PreparedStatementState state = None ):
152153 if self .cancel_waiter is not None :
@@ -171,6 +172,7 @@ cdef class BaseProtocol(CoreProtocol):
171172 finally :
172173 return await waiter
173174
175+ @cython.iterable_coroutine
174176 async def bind_execute(self , PreparedStatementState state, args,
175177 str portal_name, int limit, return_extra,
176178 timeout):
@@ -203,6 +205,7 @@ cdef class BaseProtocol(CoreProtocol):
203205 finally :
204206 return await waiter
205207
208+ @cython.iterable_coroutine
206209 async def bind_execute_many(self , PreparedStatementState state, args,
207210 str portal_name, timeout):
208211
@@ -238,6 +241,7 @@ cdef class BaseProtocol(CoreProtocol):
238241 finally :
239242 return await waiter
240243
244+ @cython.iterable_coroutine
241245 async def bind(self , PreparedStatementState state, args,
242246 str portal_name, timeout):
243247
@@ -266,6 +270,7 @@ cdef class BaseProtocol(CoreProtocol):
266270 finally :
267271 return await waiter
268272
273+ @cython.iterable_coroutine
269274 async def execute(self , PreparedStatementState state,
270275 str portal_name, int limit, return_extra,
271276 timeout):
@@ -295,6 +300,7 @@ cdef class BaseProtocol(CoreProtocol):
295300 finally :
296301 return await waiter
297302
303+ @cython.iterable_coroutine
298304 async def query(self , query, timeout):
299305 if self .cancel_waiter is not None :
300306 await self .cancel_waiter
@@ -319,6 +325,7 @@ cdef class BaseProtocol(CoreProtocol):
319325 finally :
320326 return await waiter
321327
328+ @cython.iterable_coroutine
322329 async def copy_out(self , copy_stmt, sink, timeout):
323330 if self .cancel_waiter is not None :
324331 await self .cancel_waiter
@@ -373,6 +380,7 @@ cdef class BaseProtocol(CoreProtocol):
373380
374381 return status_msg
375382
383+ @cython.iterable_coroutine
376384 async def copy_in(self , copy_stmt, reader, data,
377385 records, PreparedStatementState record_stmt, timeout):
378386 cdef:
@@ -491,6 +499,7 @@ cdef class BaseProtocol(CoreProtocol):
491499
492500 return status_msg
493501
502+ @cython.iterable_coroutine
494503 async def close_statement(self , PreparedStatementState state, timeout):
495504 if self .cancel_waiter is not None :
496505 await self .cancel_waiter
@@ -530,6 +539,7 @@ cdef class BaseProtocol(CoreProtocol):
530539 self ._terminate()
531540 self .transport.abort()
532541
542+ @cython.iterable_coroutine
533543 async def close(self , timeout):
534544 if self .closing:
535545 return
@@ -651,6 +661,7 @@ cdef class BaseProtocol(CoreProtocol):
651661 self .cancel_sent_waiter is not None
652662 )
653663
664+ @cython.iterable_coroutine
654665 async def _wait_for_cancellation(self ):
655666 if self .cancel_sent_waiter is not None :
656667 await self .cancel_sent_waiter
0 commit comments