def query(querystr, connection=None, **connectkwargs):
if connection is None:<EOL><INDENT>connection = connect(**connectkwargs)<EOL><DEDENT>cursor = connection.cursor()<EOL>cursor.execute(querystr)<EOL>return cursor.fetchall()<EOL>
Execute a query of the given SQL database