def limit_clause(self, select, **kw):
    text = ''
    if (select._limit_clause is not None):
        text += ('\n LIMIT ' + self.process(select._limit_clause, **kw))
    if (select._offset_clause is not None):
        if (select._limit_clause is None):
            text += ('\n LIMIT ' + self.process(sql.literal((- 1))))
        text += (' OFFSET ' + self.process(select._offset_clause, **kw))
    else:
        text += (' OFFSET ' + self.process(sql.literal(0), **kw))
    return text
def limit_clause(self, select, **kw):
    text = 
    if (select._limit_clause is not None):
        text += ('\n LIMIT ' + self.process(select._limit_clause, **kw))
    if (select._offset_clause is not None):
        if (select._limit_clause is None):
            text += ('\n LIMIT ' + self.process(sql.literal((- 1))))
        text += (' OFFSET ' + self.process(select._offset_clause, **kw))
    else:
        text += (' OFFSET ' + self.process(sql.literal(0), **kw))
    return text