- 授权协议: AGPL
- 开发语言: Python
- 操作系统: 跨平台
- 软件首页: http://ponyorm.com/
- 软件文档: http://doc.ponyorm.com/
- 官方下载: https://github.com/ponyorm/pony/releases
软件介绍
Pony ORM 非常有趣.
Pony 可以将 Python Generators 翻译成 SQL.
它拥有可视编辑器和模型等其他特性.
Free for Non-commercial use with paid commercial licenses.
语法:
select(c for c in Customer if sum(c.orders.price) > 1000)
翻译成 SQL 后的效果:
SELECT "c"."id"
FROM "Customer" "c"
LEFT JOIN "Order" "order-1"
ON "c"."id" = "order-1"."customer"
GROUP BY "c"."id"
HAVING coalesce(SUM("order-1"."total_price"), 0) > 1000
