def rows(document_id, table_id): document, tabular = get_tabular(document_id, table_id) query = tabular_query(document_id, table_id, request.args) query['size'] = get_limit(default=100) query['from'] = get_offset() return jsonify(execute_tabular_query(document_id, table_id, request.args, query))
def rows(document_id, table_id): document, tabular = get_tabular(document_id, table_id) query = tabular_query(document_id, table_id, request.args) query['size'] = get_limit(default=100) query['from'] = get_offset() result = execute_tabular_query(query) params = next_params(request.args, result) if params is not None: result['next'] = url_for('documents_api.rows', document_id=document_id, table_id=table_id, **params) return jsonify(result)