Re: about client-side cursors
От | Christophe Pettus |
---|---|
Тема | Re: about client-side cursors |
Дата | |
Msg-id | D5AD2540-1414-4C13-9794-28282C8F5620@thebuild.com обсуждение исходный текст |
Ответ на | Re: about client-side cursors (Karsten Hilbert <Karsten.Hilbert@gmx.net>) |
Список | psycopg |
> On Feb 3, 2021, at 09:41, Karsten Hilbert <Karsten.Hilbert@gmx.net> wrote: > Perhaps client-side cursors were invented to make it possible > to code to the same API regardless of whether real > (server-side) cursors are used or not ? That's definitely part of it. The name "cursor" for the client-side object is a bit unfortunate, but we need *something* there. The operations are: 1. Send query to server and execute it. 2. Retrieve results from server. Those are both asynchronous operations, and we need something to encapsulate the state to pass from #1 to #2. You couldjust have the connection object do that, but then we're declaring forever that we can't run two queries at the sametime on the same connection, and that seems unwise. -- -- Christophe Pettus xof@thebuild.com
В списке psycopg по дате отправления: