def METHOD_NAME(self, query, user):
    results = self.api.query(query)
    if "code" in results and results["code"] != 200:
        return None, "{}: {}".format(results["type"], results["message"])
    if "results" not in results:
        message = results.get("message", "Unknown response from Rockset.")
        return None, message
    rows = results["results"]
    columns = []
    if len(rows) > 0:
        columns = []
        for k in rows[0]:
            columns.append({"name": k, "friendly_name": k, "type": _get_type(rows[0][k])})
    data = json_dumps({"columns": columns, "rows": rows})
    return data, None