def METHOD_NAME(self, cursor, query_type=None):
    if not self.returning_clause:
        return cursor.getconnection().last_insert_rowid()
    elif query_type == Insert.SIMPLE:
        try:
            return cursor[0][0]
        except (AttributeError, IndexError, TypeError):
            pass
    return cursor