<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def query_file(self, path, fetchall=False, **params):
 """Like Database.query, but takes a filename to load a query from."""


        with self.get_connection() as conn:
            return conn.query_file(path, fetchall, **params)