from dataclasses import fields
user_projection: tuple[str] = await fetch_projection(User, id=1, fields(User))
In fquery , this would be spelled as:
My request is to consider that some of the implementations may not be presenting a flat result set. For example this query:
resp = (
Without the "to_json()" it produces a graph of similarly nested python objects.
Type checkers that can understand these queries and provide type safety to consumers of the result set would be a great reason for web frameworks to adopt this vs the status quo where the internals of a relational database are exposed via a python API.