Skip to content

Conversation

@OreoYang
Copy link
Owner

@OreoYang OreoYang commented Oct 22, 2025

Summary by CodeRabbit

  • Documentation
    • Added comprehensive SYS_CONTEXT function documentation covering usage, supported parameters, and Oracle compatibility
    • Reorganized built-in functions documentation structure for improved clarity
    • Added SYS_CONTEXT to the public built-in functions reference
    • Updates provided in both English and Chinese

@coderabbitai
Copy link

coderabbitai bot commented Oct 22, 2025

Walkthrough

Documentation is added across Chinese and English to introduce comprehensive SYS_CONTEXT built-in function support. Navigation structures are restructured to group the function under a new "Built-in Functions" section, and detailed reference pages with implementation details and parameter documentation are created.

Changes

Cohort / File(s) Change Summary
Navigation restructuring
CN/modules/ROOT/nav.adoc, EN/modules/ROOT/nav.adoc
Navigation entries reorganized: direct 6.4 GB18030 link replaced with a new "Built-in Functions" group containing nested 6.4.1 sys_context entry; original 6.5 GB18030 link repositioned after the new group.
SYS_CONTEXT reference documentation
CN/modules/ROOT/pages/master/6.4.1.adoc, EN/modules/ROOT/pages/master/6.4.1.adoc
New documentation pages added describing SYS_CONTEXT functionality, including feature overview, implementation principles, SQL function skeleton, supported parameters for USERENV and SYS_SESSION_ROLES contexts, and Oracle compatibility details.
Built-in functions list
CN/modules/ROOT/pages/master/7.8.adoc, EN/modules/ROOT/pages/master/7.8.adoc
SYS_CONTEXT function added to the public built-in functions catalog with description block and usage example.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

📚 A rabbit hops through docs so bright,
SYS_CONTEXT now shines in morning light,
Chinese, English, side by side,
Built-in functions multiplied! 🐰✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "add adocs for sys_context function" clearly and accurately summarizes the main change in the pull request. The PR adds comprehensive documentation (adocs) for the sys_context function across multiple files—including new documentation pages (6.4.1.adoc), navigation updates (nav.adoc), and function catalog entries (7.8.adoc) in both Chinese and English modules. The title is concise, specific, and free of vague terminology, making it clear to a teammate scanning the repository history that this PR introduces documentation for sys_context functionality.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch sys_context

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
CN/modules/ROOT/pages/master/6.4.1.adoc (1)

48-48: Minor: Consider standardizing table column widths across EN and CN versions.

The English version uses [cols="3,7"] for parameter tables while the Chinese version uses [cols="2,8"]. While this difference may be intentional to accommodate text width for translations, standardizing to a consistent column specification across both languages would improve visual consistency. This is a low-priority suggestion if the current widths provide better readability in each language.

Also applies to: 63-63

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6347a79 and 9a19c93.

📒 Files selected for processing (6)
  • CN/modules/ROOT/nav.adoc (1 hunks)
  • CN/modules/ROOT/pages/master/6.4.1.adoc (1 hunks)
  • CN/modules/ROOT/pages/master/7.8.adoc (46 hunks)
  • EN/modules/ROOT/nav.adoc (1 hunks)
  • EN/modules/ROOT/pages/master/6.4.1.adoc (1 hunks)
  • EN/modules/ROOT/pages/master/7.8.adoc (45 hunks)
🔇 Additional comments (6)
EN/modules/ROOT/pages/master/6.4.1.adoc (1)

1-91: Comprehensive and well-structured documentation.

The SYS_CONTEXT function documentation effectively covers implementation principles, the function skeleton with proper SECURITY INVOKER declaration, and thorough parameter documentation across both USERENV and SYS_SESSION_ROLES namespaces. The AsciiDoc formatting is correct, and the content provides clear guidance for users.

EN/modules/ROOT/nav.adoc (1)

28-30: Navigation restructuring is correct and logically organized.

The new "Built-in Functions" grouping (Line 28) with nested sys_context reference (Line 29) is properly positioned as a sibling to "Compatibility Features," and the GB18030 entry (Line 30) is appropriately maintained as a sibling group. The hierarchy is syntactically correct and the cross-reference targets the new documentation page.

CN/modules/ROOT/nav.adoc (1)

29-31: Chinese navigation restructuring mirrors English version appropriately.

The 内置函数 (Built-in Functions) grouping and corresponding sys_context entry are correctly positioned as siblings to 兼容特性 with proper hierarchy. Cross-references are valid and match the documentation files.

CN/modules/ROOT/pages/master/7.8.adoc (1)

77-77: SYS_CONTEXT properly integrated into Chinese public function catalog.

The function entry (Line 77) is correctly added to the catalog table, and the documentation block (Lines 1144–1150) includes a clear description and practical example (sys_context('USERENV','DB_NAME')). The format is consistent with other function entries in the file.

Also applies to: 1144-1150

EN/modules/ROOT/pages/master/7.8.adoc (1)

77-77: SYS_CONTEXT properly added to English public function catalog.

The function entry (Line 77) is correctly added to the catalog table, and the documentation block (Lines 1142–1150) provides a clear description and consistent example with the Chinese version. Format and style align with existing function entries.

Also applies to: 1142-1150

CN/modules/ROOT/pages/master/6.4.1.adoc (1)

1-88: Chinese documentation mirrors English version with appropriate localization.

The structure, implementation principles, and parameter documentation are comprehensive and consistent with the English version. The Chinese parameter tables provide thorough documentation of USERENV and SYS_SESSION_ROLES attributes. The function skeleton appropriately demonstrates the use of SECURITY INVOKER for privilege handling.

@OreoYang OreoYang closed this Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants