MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / entity_rows

Function entity_rows

src/dashboard/memory_queries.rs:59–72  ·  view source on GitHub ↗
(state: &DashboardState, limit: i64)

Source from the content-addressed store, hash-verified

57}
58
59pub(crate) async fn entity_rows(state: &DashboardState, limit: i64) -> Result<Vec<Value>, String> {
60 query_rows(
61 &state.mem_conn,
62 "SELECT e.entity_id, e.name, e.entity_type, e.aliases, e.created_at,
63 COUNT(fe.fact_id) AS fact_count
64 FROM memory_entities e
65 LEFT JOIN memory_fact_entities fe ON fe.entity_id = e.entity_id
66 GROUP BY e.entity_id
67 ORDER BY fact_count DESC, e.name ASC
68 LIMIT ?1",
69 libsql::params![limit],
70 )
71 .await
72}
73
74pub(crate) async fn trust_histogram_rows(state: &DashboardState) -> Result<Vec<Value>, String> {
75 query_rows(

Callers 1

fetch_entitiesFunction · 0.85

Calls 1

query_rowsFunction · 0.85

Tested by

no test coverage detected