Skip to content

Commit b24ecb7

Browse files
committed
Update Force View doc.
1 parent 6cea0b2 commit b24ecb7

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

CN/modules/ROOT/pages/master/7.18.adoc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@
55

66
= Force View
77

8-
== 1.目的
8+
== 目的
99

1010
- 本文档解释 IvorySQL 中 Force View 的用途,帮助用户在依赖对象尚未就绪时仍可创建强制视图占位并保持与 Oracle 行为一致。
11-
- Force View 支持 Oracle 迁移,可通过自动或显式编译在依赖满足后快速恢复为普通视图
11+
- Force View 可支持在依赖表尚未准备好的情况下进行视图迁移,在依赖满足后通过自动或显式编译快速恢复为普通视图
1212

13-
== 2.功能说明
13+
== 功能说明
1414

1515
- `CREATE [OR REPLACE] FORCE VIEW`:即使查询引用了不存在的表或函数,也会创建视图占位对象并保存原始 SQL,提示“View created with compilation errors”。
1616
- 自动编译:访问 Force View 时会尝试重新编译;成功后变为普通视图,失败则报错 `view "<schema>.<name>" has errors`。
1717
- 依赖失效回退:当普通视图因依赖对象被删除或结构变更而失效时,系统会自动将其转化为 Force View,保留最后一次有效定义以便后续恢复。
1818

19-
== 3.测试用例
19+
== 测试用例
2020

21-
=== 3.1 创建缺失依赖的 Force View
21+
=== 创建缺失依赖的 Force View
2222

2323
[source,sql]
2424
----
@@ -28,7 +28,7 @@ SELECT c_id, c_name FROM missing_customer;
2828
-- 期望输出:WARNING: View created with compilation errors
2929
----
3030

31-
=== 3.2 自动编译并恢复为普通视图
31+
=== 自动编译并恢复为普通视图
3232

3333
[source,sql]
3434
----
@@ -44,7 +44,7 @@ SELECT * FROM fv_customer;
4444
-- 成功时视图转换为普通视图并返回数据
4545
----
4646

47-
=== 3.3 显式编译与失败回退
47+
=== 显式编译与失败回退
4848

4949
[source,sql]
5050
----

EN/modules/ROOT/pages/master/7.18.adoc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,21 @@
55

66
= Force View
77

8-
== 1. Purpose
8+
== Purpose
99

1010
- This document explains the purpose of Force View in IvorySQL and shows how it enables users to create placeholder views when dependencies are not yet ready while keeping the behavior aligned with Oracle.
11-
- Force View supports Oracle migrations by storing the original SQL text so the view can be recompiled automatically or manually and become a normal view as soon as dependencies are satisfied.
11+
- Force View supports migrating views even when dependent tables are not yet ready, and can swiftly revert to regular views through automatic or explicit compilation once
12+
dependencies are satisfied.
1213

13-
== 2. Feature Description
14+
== Feature Description
1415

1516
- `CREATE [OR REPLACE] FORCE VIEW`: Creates a view object even when the query references missing tables or functions. The system retains the SQL definition and returns the message `WARNING: View created with compilation errors`.
1617
- Automatic compilation: When a Force view is accessed, IvorySQL attempts recompilation. If it succeeds, the view becomes a normal view; if it fails, it raises `view "<schema>.<name>" has errors`.
1718
- Dependency fallback: When a normal view is invalidated because dependencies are removed or altered, IvorySQL automatically converts it into a Force view, preserving the latest valid definition so it can be restored quickly once dependencies are rebuilt.
1819

19-
== 3. Test Cases
20+
== Test Cases
2021

21-
=== 3.1 Create a Force View with Missing Dependencies
22+
=== Create a Force View with Missing Dependencies
2223

2324
[source,sql]
2425
----
@@ -28,7 +29,7 @@ SELECT c_id, c_name FROM missing_customer;
2829
-- Expected output: WARNING: View created with compilation errors
2930
----
3031

31-
=== 3.2 Automatic Compilation and Recovery
32+
=== Automatic Compilation and Recovery
3233

3334
[source,sql]
3435
----
@@ -44,7 +45,7 @@ SELECT * FROM fv_customer;
4445
-- On success, the view becomes a normal view and returns data.
4546
----
4647

47-
=== 3.3 Explicit Compilation and Failure Fallback
48+
=== Explicit Compilation and Failure Fallback
4849

4950
[source,sql]
5051
----
@@ -64,4 +65,3 @@ CREATE TABLE missing_customer_v2(
6465
ALTER VIEW fv_customer COMPILE;
6566
-- Expected output: ALTER VIEW succeeds and the view returns to normal.
6667
----
67-

0 commit comments

Comments
 (0)