Skip to content

Commit 1facb9d

Browse files
committed
Edit
1 parent 06027cb commit 1facb9d

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

SeaORM/i18n/zh-CN/docusaurus-plugin-content-docs/current/01-index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292

9393
7.1 [健壮与正确](07-write-test/01-testing.md)
9494

95-
7.2 [Mock 接口](07-write-test/02-mock.md)
95+
7.2 [模拟接口](07-write-test/02-mock.md)
9696

9797
7.3 [使用 SQLite](07-write-test/03-sqlite.md)
9898

SeaORM/i18n/zh-CN/docusaurus-plugin-content-docs/current/03-migration/01-setting-up-migration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# 设置迁移
22

33
:::tip SeaQL 的 Rust 贴纸包 🦀
4-
[我们的贴纸](https://www.sea-ql.org/sticker-pack/)由优质防水 PVC 制成,具有独特的哑光表面,非常适合粘贴在笔记本电脑或其他小工具的背面!
4+
[我们的贴纸](https://www.sea-ql.org/sticker-pack/cn/)由优质防水 PVC 制成,具有独特的哑光表面,非常适合粘贴在笔记本电脑或其他小工具的背面!
55
:::
66

77
SeaORM 提供强大的迁移系统,让你可以使用 SeaQuery 语句或原生 SQL 来创建表、修改 schema 以及填充数据。

SeaORM/i18n/zh-CN/docusaurus-plugin-content-docs/current/06-relation/01-one-to-one.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# 一对一
22

33
:::tip SeaQL 的 Rust 贴纸包 🦀
4-
[我们的贴纸](https://www.sea-ql.org/sticker-pack/)由优质防水 PVC 制成,具有独特的哑光表面,非常适合粘贴在笔记本电脑或其他小工具的背面!
4+
[我们的贴纸](https://www.sea-ql.org/sticker-pack/cn/)由优质防水 PVC 制成,具有独特的哑光表面,非常适合粘贴在笔记本电脑或其他小工具的背面!
55
:::
66

77
一对一关系是最基本的数据库关系类型。假设一个 `Cake` Entity 最多有一个 `Fruit` 配料。

SeaORM/i18n/zh-CN/docusaurus-plugin-content-docs/current/07-write-test/02-mock.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Mock 接口
1+
# 模拟接口
22

33
To unit test more complex application logic with asynchronous interface and multiple underlying queries, you can use the mock database interface.
44

@@ -14,7 +14,7 @@ To ensure the correctness of your application logic, you can also validate the t
1414

1515
Check out how we write unit tests using mock connection [here](https://github.com/SeaQL/sea-orm/blob/master/src/executor/paginator.rs#L250).
1616

17-
## Mock 查询结果
17+
## 模拟查询结果
1818

1919
We create a mock database for PostgreSQL with `MockDatabase::new(DatabaseBackend::Postgres)`. Then, query results are prepared using the `append_query_results` method. Note that we pass a vector of vectors to it, representing multiple query results, each with more than one model. Finally, we convert it into a connection and use it to perform CRUD operations just like a normal live connection.
2020

@@ -138,7 +138,7 @@ mod tests {
138138
}
139139
```
140140

141-
## Mock 执行结果
141+
## 模拟执行结果
142142

143143
This is very similar to mocking query result, the differences are that we use the `append_exec_results` method here and we perform insert, update, and delete operations here in the unit test. The `append_exec_results` method takes a vector of `MockExecResult`, each representing the exec result of the corresponding operation.
144144

SeaORM/i18n/zh-CN/docusaurus-plugin-content-docs/current/08-advanced-query/08-nested-active-model.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# 嵌套 ActiveModel
22

3-
在 SeaORM 2.0 中,我们引入了 [Smart Entity Loader](https://www.sea-ql.org/blog/2025-10-20-sea-orm-2.0/)(英文),使查询多路径关系到嵌套模型变得简单高效。这解决了读取端的问题。
3+
在 SeaORM 2.0 中,我们引入了 [Smart Entity Loader](https://www.sea-ql.org/blog/2025-10-20-sea-orm-2.0/),使查询多路径关系到嵌套模型变得简单高效。这解决了读取端的问题。
44

5-
有了 nested ActiveModel,你现在可以做相反的事:在一次操作中将嵌套对象持久化回数据库。SeaORM 遍历树、检测变更、构建 insert 和 update 语句,并以正确的顺序执行它们以遵守外键依赖。
5+
有了 nested ActiveModel,你现在可以做相反的事:在一次操作中将嵌套对象回写数据库。SeaORM 遍历树、检测变更、构建 insert 和 update 语句,并以正确的顺序执行它们以遵守外键依赖。
66

7-
你可以在此页面的 [quickstart 示例](https://github.com/SeaQL/sea-orm/blob/master/examples/quickstart/src/main.rs)中找到本文描述的所有技术。
7+
你可以在此页面的 [快速入门示例](https://github.com/SeaQL/sea-orm/blob/master/examples/quickstart/src/main.rs)中找到本文描述的所有技术。
88

99
## 概要
1010

@@ -50,7 +50,7 @@ user::ActiveModelEx {
5050
.await?
5151
```
5252

53-
.. 等价于手动执行以下操作
53+
.. 等于手动执行以下操作
5454

5555
```rust
5656
let txn = db.begin().await?;

SeaORM/i18n/zh-CN/docusaurus-plugin-content-docs/current/09-schema-statement/01-create-table.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# 创建表
22

33
:::tip Rustacean 贴纸包 🦀
4-
[我们的贴纸](https://www.sea-ql.org/sticker-pack/)采用优质防水乙烯基制成,具有独特的哑光效果。
4+
[我们的贴纸](https://www.sea-ql.org/sticker-pack/cn/)采用优质防水乙烯基制成,具有独特的哑光效果。
55
将它们贴在笔记本电脑、笔记本或任何小工具上,展示你对 Rust 的热爱!
66
:::
77

0 commit comments

Comments
 (0)