MCPcopy Create free account
hub / github.com/AgentOps-AI/agentops / fetchall

Method fetchall

app/api/agentops/exporter/processor.py:162–169  ·  view source on GitHub ↗
(self, query: str, **kwargs)

Source from the content-addressed store, hash-verified

160 write_dropped_record(self.table_name, kwargs.get('id', 'unknown'), e)
161
162 async def fetchall(self, query: str, **kwargs) -> AsyncGenerator[BaseModel, None]:
163 query = query.format(table_name=self.table_name, **kwargs)
164 async with get_supabase_pool().connection() as conn:
165 # Use a dictionary row factory to get rows as dictionaries
166 async with conn.cursor(row_factory=psycopg.rows.dict_row) as cur:
167 await cur.execute(query)
168 for row in await cur.fetchall():
169 yield self.get_model_instance(**row)
170
171 async def fetchone(self, query: str, **kwargs) -> BaseModel:
172 query = query.format(table_name=self.table_name, **kwargs)

Callers 2

fetch_all_for_sessionFunction · 0.80
get_sessionsFunction · 0.80

Calls 3

get_model_instanceMethod · 0.95
get_supabase_poolFunction · 0.85
formatMethod · 0.45

Tested by

no test coverage detected