开发者

how to connect/insert sqlalchemy orm result to class schema

开发者 https://www.devze.com 2022-12-07 19:38 出处:网络
i want开发者_运维问答 to connect my sqlalchemy orm result to a class schema class StoreOrderOverallFlat(): id: int pending: int processing: int delivered: int total: int pickup: int delivery: int

i want开发者_运维问答 to connect my sqlalchemy orm result to a class schema

class StoreOrderOverallFlat(): id: int pending: int processing: int delivered: int total: int pickup: int delivery: int query = db.select([order.columns.store_id,store.columns.name.label('store_name'),delivery,processing, pickup,delivered,pending,total]).select_from(store.join(order,order.columns.store_id==store.columns.id)).group_by(order.columns.store_id,store.columns.name) `

i dont want it in a table form, i want it to be in class schema

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号