Example #1
0
def get_tabular(document_id, table_id):
    document = get_document(document_id)
    try:
        table = document.tables[table_id]
    except IndexError:
        raise NotFound("No such table: %s" % table_id)
    return document, table
Example #2
0
def records(document_id):
    etag_cache_keygen()
    document = get_document(document_id)
    query = records_query(document.id, request.args)
    if query is None:
        return jsonify({
            'status': 'ok',
            'message': 'no query'
        })
    query['size'] = get_limit(default=30)
    query['from'] = get_offset()
    res = execute_records_query(document.id, request.args, query)
    return jsonify(res)