databases icon indicating copy to clipboard operation
databases copied to clipboard

Fix postgres KeyError with missing explicit columns (#190)

Open rsommer opened this issue 3 years ago • 0 comments

If no explicit colum info is present, the postgres Record class causes a KeyError. Besides the given example in encode/databases#190 this also happens if you construct the queries from text-clauses.

Handling this the same way as if there is no entry in self._column_map fixes the error.

A simple testcase is added as well.

I did a simple test run using sqlite and postgres.

rsommer avatar Apr 01 '22 10:04 rsommer