@staticmethod
def slice_query(table, slice_length):
    """
        Slice query for entire table,
        It will just return the same result as query.all() but safely for memory cache.
        回傳值等同 query.all(), 但能確保在低記憶體主機上安全執行.
        """
    count = 0
    results = list()
    while True:
        start = slice_length * count
        end = slice_length * (count + 1)
        slice_cache = table.query.slice(start, end).all()
        if slice_cache:
            results.extend(slice_cache)
        if len(slice_cache) < slice_length:
            break
        count += 1
    return results
