def rows(table_name): table = db.get(table_name) if table is None: raise NotFound() authz.require(authz.table(table)) q = OuijaQuery(db, { 'columns': [{'table': table_name}] }) return jsonify(Pager(q, table_name=table_name, _external=True))
def view(table_name): table = db.get(table_name) if table is None: raise NotFound() authz.require(authz.table(table)) return jsonify(table)