| From: | Rory Campbell-Lange <rory(at)campbell-lange(dot)net> | 
|---|---|
| To: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> | 
| Cc: | Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>, Denis Laxalde <denis(dot)laxalde(at)dalibo(dot)com>, psycopg(at)postgresql(dot)org | 
| Subject: | Re: Latest developments in psycopg3 | 
| Date: | 2021-02-08 16:50:14 | 
| Message-ID: | 20210208165014.GA8138@campbell-lange.net | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | psycopg | 
On 08/02/21, Adrian Klaver (adrian(dot)klaver(at)aklaver(dot)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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Daniel Fortunov | 2021-02-08 22:38:10 | Re: Latest developments in psycopg3 | 
| Previous Message | Adrian Klaver | 2021-02-08 16:39:08 | Re: Latest developments in psycopg3 |