in optional-kubernetes-engine/bookshelf/model_cloudsql.py [0:0]
def list(limit=10, cursor=None):
cursor = int(cursor) if cursor else 0
query = (Book.query
.order_by(Book.title)
.limit(limit)
.offset(cursor))
books = builtin_list(map(from_sql, query.all()))
next_page = cursor + limit if len(books) == limit else None
return (books, next_page)