@classmethod
def get_raw_args(cls, q, request=None):
    """
        Return a Query object's SQL augmented with params from cls.get_extras.
        """
    sql, params = q.sql, q.params
    extra_sql, extra_params = cls.get_extras(q, request)
    if extra_sql:
        if "'%s'" in extra_sql:
            raise ValueError(
                'Dangerous use of quotes around place holder. Please see https://docs.djangoproject.com/en/2.2/ref/models/querysets/#extra for more details.'
                )
        sql = sql.rstrip(';') + extra_sql + ';'
        params += extra_params
    return sql, params
