Skip to content

Rm direct db calls #1045

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

TeachMeTW
Copy link
Contributor

@TeachMeTW TeachMeTW commented Apr 15, 2025

@TeachMeTW TeachMeTW force-pushed the RM_Direct_DBCalls branch 2 times, most recently from ecd1692 to 810dd08 Compare April 15, 2025 19:20
@TeachMeTW
Copy link
Contributor Author

image image image

Updated multiple query functions across place_queries, section_queries, stop_queries, and trip_queries to replace direct database calls with the TimeSeries abstraction.
@TeachMeTW
Copy link
Contributor Author

Commonality between section query, trip query, and stop query:

  • All use metadata.key to identify document types: query = {"user_id": user_id, "metadata.key": "analysis/confirmed_trip"}
  • Query by parent ID (trip_id, section_id): query = {"user_id": user_id, "data.trip_id": trip_id, "metadata.key": key}
  • Hierarchical structure: Trip → Sections → Stops
  • All sort by timestamps (start_ts, enter_ts, etc.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant