Added query methods to PostgreSQL and Redis repositories to comply with DRY principle, updated repositories to use this new method, added a getAllRows() method for query results, and added a test for this functionality.