MCPcopy Create free account
hub / github.com/MagicStack/asyncpg / cursor

Method cursor

asyncpg/prepared_stmt.py:104–123  ·  view source on GitHub ↗

Return a *cursor factory* for the prepared statement. :param args: Query arguments. :param int prefetch: The number of rows the *cursor iterator* will prefetch (defaults to ``50``.) :param float timeout: Optional timeout in seconds. :ret

(self, *args, prefetch=None,
               timeout=None)

Source from the content-addressed store, hash-verified

102
103 @connresource.guarded
104 def cursor(self, *args, prefetch=None,
105 timeout=None) -> cursor.CursorFactory:
106 """Return a *cursor factory* for the prepared statement.
107
108 :param args: Query arguments.
109 :param int prefetch: The number of rows the *cursor iterator*
110 will prefetch (defaults to ``50``.)
111 :param float timeout: Optional timeout in seconds.
112
113 :return: A :class:`~cursor.CursorFactory` object.
114 """
115 return cursor.CursorFactory(
116 self._connection,
117 self._query,
118 self._state,
119 args,
120 prefetch,
121 timeout,
122 self._state.record_class,
123 )
124
125 @connresource.guarded
126 async def explain(self, *args, analyze=False):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected