MCPcopy
hub / github.com/llmware-ai/llmware / get_distinct_list

Method get_distinct_list

llmware/resources.py:1212–1227  ·  view source on GitHub ↗

Returns distinct list by col (key)

(self, key)

Source from the content-addressed store, hash-verified

1210 return output_results
1211
1212 def get_distinct_list(self, key):
1213
1214 """Returns distinct list by col (key)"""
1215
1216 sql_query = f"SELECT DISTINCT {key} FROM {self.library_name};"
1217 results = self.conn.cursor().execute(sql_query)
1218
1219 output = []
1220 for res in results:
1221 if res:
1222 if len(res) > 0:
1223 output.append(res[0])
1224
1225 self.conn.close()
1226
1227 return output
1228
1229 def filter_by_key_dict (self, key_dict):
1230

Callers 7

list_doc_idMethod · 0.45
list_doc_fnMethod · 0.45
get_distinct_listMethod · 0.45
get_distinct_listMethod · 0.45
input_build_folderMethod · 0.45

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected