I've been asked to migrate a program from psycopg2 to psycopg3. In this program they use
with connection.cursor(cursor_factory=RealDictCursor) as cursor:
to obtain a dictionary that's later turned into a JSON file.
My problem is that RealDictCursor appears to be a psycopg2 extra feature, and as such get an error when trying to use it for psycopg3. Is there any alternative for use in psycopg3?
Tried using the psycopg2 library but didn't work. Didn't find any suitable alternative for psycopg3 other than manually going through the returned data