You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we're depending on psycopg2's different cursor types for the implementation of back_as. I supposed we'd need to unroll those in order to support a back_as argument to cursor.{one,all}. Python's namedtuples have an _asdict method that can be used to serialize to a dictionary. Maybe that is helpful here?
This branch adds a `back_as` argument to all cursor methods (#39) and further modifies those methods so that `back_as` trumps the unpacking of single-column rows (#42).
Postgres.all()
andPostgres.one()
support theback_as
argument, but the same methods on cursors don't, which for example prevents doing(cursor or db).all(..., back_as=dict)
.The text was updated successfully, but these errors were encountered: