Opened 9 years ago

Closed 4 months ago

#23 closed enhancement (fixed)

Add methods returning dicts of rows to the classic module

Reported by: cito Owned by: darcy
Priority: major Milestone: 5.1
Component: Classic API Version: 4.0
Keywords: Cc:

Description (last modified by cito)

Add new methods in the classic module, similar to getresult(), dictresult() and namedresult(), but returning dictionaries of rows instead of lists of rows (with primary key or oids as keys).

Or instead of adding new methods, add a boolean flag to the existing methods (see also #48).

Change History (3)

comment:1 Changed 7 years ago by cito

  • Description modified (diff)

comment:2 Changed 4 years ago by cito

  • Milestone changed from 4.2 to 5.1

A boolean asdict parameter could be added to the three methods.

However, this would involve wrapping the query object of _pg into a DBQuery object defined as class in pg that implements these methods, since we probably don't want to do this in the C module.

Could be implemented together with #48 and #67.

comment:3 Changed 4 months ago by cito

  • Resolution set to fixed
  • Status changed from new to closed

This has essentially been implemented via get_as_dict in PyGres 5.0.

Note: See TracTickets for help on using tickets.