yii 使用的 ORM 是什么?

发布于 2024-08-30 13:52:18 字数 16 浏览 1 评论 0 原文

他们自己实施的吗?

Did they implement it themselves?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

太傻旳人生 2024-09-06 13:52:18

他们的 ORM 似乎被称为 Yii Active Record

Their ORM seems to be called Yii Active Record.

简单气质女生网名 2024-09-06 13:52:18

来自 Yii 网站

Yii Active Record (AR) 作为广泛采用的对象关系映射 (ORM) 方法实现,进一步简化了数据库编程。 Yii AR 用类来表示表,用实例来表示行,从而消除了编写主要处理 CRUD(创建、读取、更新和删除)操作的 SQL 语句的重复任务。

这是关于 AR 的文档: www.yiiframework.com/doc/guide/database.ar< /a>
这是文档 API:
http://www.yiiframework.com/doc/api/1.1 /CActiveRecord

我真的很喜欢它。我使用 Yii 已经有几年了,我认为 AR 非常快:)

From Yii Site

And Yii Active Record (AR), implemented as a widely adopted Object-Relational Mapping (ORM) approach, further simplifies database programming. Representing a table in terms of a class and a row an instance, Yii AR eliminates the repetitive task of writing those SQL statements that mainly deal with CRUD (create, read, update and delete) operations.

This is the documentation about AR: www.yiiframework.com/doc/guide/database.ar
This is the documenation API: http://www.yiiframework.com/doc/api/1.1/CActiveRecord

I really like it. I use Yii since a couple of year and I think that AR is very fast :)

椒妓 2024-09-06 13:52:18

Yii ORM 被称为“Active Record”,主要受到 Ruby on Rails Active Record 的启发(即使“Active Record 模式”在许多语言中使用:http://en.wikipedia.org/wiki/Active_record_pattern )。它当然是由 Yii 开发团队开发的(我猜主要是它的创建者薛强)。 Yii 2 改进了相同的概念。
Yii 指南在谈论命名范围时对 Ruby on Rails AR 给予了认可: http://www.yiiframework.com/doc/guide/1.1/en/database.ar#named-scopes
我不是 Ruby on Rails 的专家,但我知道这两个 ORM 中的关系定义方式非常相似: http://www.yiiframework.com/doc/guide/1.1/en/database.arr#declaring-relationship

Ruby on Rails 中的活动记录:
http://guides.rubyonrails.org/

Ruby on Rails 中的 ActiveRecord 类:
http://ar.rubyonrails.org/

Yii 中的活动记录:
http://www.yiiframework.com/doc/guide/1.1/ en/database.ar

Yii 中的 CActiveRecord 类:
http://www.yiiframework.com/doc/api/1.1/CActiveRecord

最后但并非最不重要的一点是 GitHub 中的 Yii 开发团队!
https://github.com/yiisoft?tab=members

Yii ORM is called "Active Record" is mostly inspired by Ruby on Rails Active Record (even if the "Active Record pattern" is used in many languages: http://en.wikipedia.org/wiki/Active_record_pattern ). It was of course developed by the Yii developers team (mostly by its creator Qiang Xue, I guess). The same concept was improved for Yii 2.
Yii guide gives credit to Ruby on Rails AR when talking about Named Scopes: http://www.yiiframework.com/doc/guide/1.1/en/database.ar#named-scopes
I am not an expert of Ruby on Rails, but I know relations are defined in a very similar way in the two ORMs: http://www.yiiframework.com/doc/guide/1.1/en/database.arr#declaring-relationship

Active Record in Ruby on Rails:
http://guides.rubyonrails.org/

The ActiveRecord class in Ruby on Rails:
http://ar.rubyonrails.org/

Active Record in Yii:
http://www.yiiframework.com/doc/guide/1.1/en/database.ar

The CActiveRecord class in Yii:
http://www.yiiframework.com/doc/api/1.1/CActiveRecord

And last but not least, the Yii developers team in GitHub!
https://github.com/yiisoft?tab=members

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文