Get raw session records without processing them as traces yet
(offset: int, limit: int)
| 231 | |
| 232 | |
| 233 | async def get_sessions(offset: int, limit: int) -> list[Session]: |
| 234 | """Get raw session records without processing them as traces yet""" |
| 235 | query = """ |
| 236 | SELECT * FROM {table_name} |
| 237 | WHERE id > '{last_session_id}' |
| 238 | ORDER BY id ASC |
| 239 | LIMIT {limit} |
| 240 | OFFSET {offset} |
| 241 | """ |
| 242 | sessions = [] |
| 243 | lsid = LAST_SESSION_ID if LAST_SESSION_ID else '00000000-0000-0000-0000-000000000000' |
| 244 | async for session in supabase[Session].fetchall(query, offset=offset, limit=limit, last_session_id=lsid): |
| 245 | sessions.append(session) |
| 246 | return sessions |
| 247 | |
| 248 | |
| 249 | async def get_sessions_as_traces(offset: int, limit: int) -> AsyncGenerator[Trace, None]: |
no test coverage detected
searching dependent graphs…