Re: Latest developments in psycopg3
От | Rory Campbell-Lange |
---|---|
Тема | Re: Latest developments in psycopg3 |
Дата | |
Msg-id | 20210208165014.GA8138@campbell-lange.net обсуждение исходный текст |
Ответ на | Re: Latest developments in psycopg3 (Adrian Klaver <adrian.klaver@aklaver.com>) |
Список | psycopg |
On 08/02/21, Adrian Klaver (adrian.klaver@aklaver.com) wrote: > On 2/8/21 4:16 AM, Daniele Varrazzo wrote: > > 1) We can provide a feature to select the type of cursor that is not > > much dissimilar from psycopg2 > > 2) Do we need DictCursor/RealDictCursor? ISTM that one of the two > > would be sufficient? Possibly an object inheriting from a Python dict > > instead of emulating it so that e.g. json.dumps() > > RealDictCursor is what I use primarily as it plays well with json.*. I have > used NamedTupleCursor for those things that play better with dot notation. I > very rarely use DictCursor anymore as it's dual nature seemed to get in the > way more then it helped. Your comments also suggests the possibility of having a convenience method, something like ._asjson() perhaps to allow rows or entire result sets json encoded.
В списке psycopg по дате отправления: