use yield from when possible; fix query_row() test