def create_search_index_colname_completer(ctxt, cass): element = ctxt.get_binding('element') if element == 'field': layout = get_table_meta(ctxt, cass) colnames = set(layout.columns.keys()) if 'solr_query' in colnames: colnames.remove('solr_query') return map(maybe_escape_name, colnames) else: return {}
def create_search_index_colname_completer(ctxt, cass): layout = get_table_meta(ctxt, cass) colnames = set(map(dequote_name, ctxt.get_binding('colname', ()))) newcols = set(layout.columns.keys()) - colnames return map(maybe_escape_name, newcols)
def restrict_rows_colname_completer(ctxt, cass): table_meta = get_table_meta(ctxt, cass) if not table_meta or not table_meta.columns: return [] return map(maybe_escape_name, table_meta.columns.keys())