与 qt4 一起使用的良好 ORM (c++) 吗? (姜戈就像……)
有人推荐 qt4 (c++) 的 ORM 吗? (就像 Django ORM)。
Does anyone have a recommendation for an ORM for qt4 (c++)? (Like a Django ORM).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我建议你看看 QDjango ORM,它可能正是你正在寻找的为了。这个 C++ ORM 仅依赖于 Qt 并构建在 Qt 的元对象系统之上以提供内省。除了模型级别的基本创建/更新/删除操作之外,它还提供了一个查询集模板类(以 django 的查询集为模型),允许构建相当复杂的查找。
还提供可选的 QtScript 支持,因此您可以访问模型并从脚本执行数据库查询。
I would suggest you take a look at the QDjango ORM, it might be just what you are looking for. This C++ ORM only depends on Qt and builds upon Qt's Meta-Object System to provide introspection. On top of the basic create/update/delete operations at the model level, it provides a queryset template class (modeled after django's querysets) which allows to build fairly complex lookups.
Optional QtScript support is also provided, so you can access your models and perform database queries from scripts.
还有一个新的开源 ORM C++ 库:QxOrm。 QxOrm 基于 QtSql Qt 模块与数据库通信,并通过 boost::serialization 以 xml 和二进制格式序列化数据。该网站是法语的,但快速示例代码和教程代码是英语的(翻译正在进行中......)。
There is also a new open source ORM C++ library : QxOrm. QxOrm is based on QtSql Qt module to communicate with database and boost::serialization to serialize your data with xml and binary format. The web site is in french but quick sample code and tutorial code is in english (a translation is in progress...).