LACMTA / metro-api-v2

Docs: https://lacmta.github.io/metro-api-v2/ Dev: https://dev-metro-api-v2.ofhq3vd1r7une.us-west-2.cs.amazonlightsail.com/docs
https://api.metro.net/docs
0 stars 3 forks source link

Add new async function to retrieve data from multiple fields #501

Closed albertkun closed 6 months ago

albertkun commented 6 months ago

This pull request adds a new async function called get_data_from_many_fields_async to retrieve data from multiple fields in the database. This function takes an async session, a model, an agency ID, and optional fields as parameters. It executes a query to retrieve the data based on the provided fields and caches the result in Redis. The function also converts the WKBElement to a serializable format.