By Suhas Das
Author
In OpenText Documentum, Document Query Language (DQL) includes special keywords that have predefined meanings for the Content Server. These keywords simplify query writing and enable dynamic behavior based on the current session or system context.
⚠️ Note: These keywords are used only in DQL queries and cannot be used in DFC methods.
1. USER Keyword
The USER keyword represents the currently logged-in user.
Usage:
- Used in comparison conditions
- Helps create dynamic, user-specific queries
Example:
SELECT process_id, object_name
FROM dm_workflow
WHERE supervisor_name = USER
👉 This query returns workflows where the current user is the supervisor.
2. TRUE and FALSE Keywords
The TRUE and FALSE keywords represent Boolean values.
Usage:
- Used with attributes of type BOOLEAN
- Simplifies logical filtering
Example:
SELECT *
FROM dm_user
WHERE r_is_group = TRUE
👉 This query retrieves all objects that represent groups.
3. DM_SESSION_DD_LOCALE Keyword
The DM_SESSION_DD_LOCALE keyword represents the best matching data dictionary locale for the current client session.
Why it’s useful:
- Handles situations where the exact client locale is not available
- Automatically selects the closest matching locale
Example Scenario
-
Server supports:
en,fr,es -
Client locale:
fr_cn(French Canadian)
Without keyword:
SELECT type_name, label_text
FROM dmi_dd_type_info
WHERE nls_key = 'fr_cn'
❌ Returns nothing (locale not found)
With keyword:
SELECT type_name, label_text
FROM dmi_dd_type_info
WHERE nls_key = DM_SESSION_DD_LOCALE
✅ Returns results using best match (fr)
Behavior:
- Tries exact match first
- If not found → finds closest match
- If no match → uses default locale
Summary
| Keyword | Purpose |
|---|---|
USER | Refers to the current logged-in user |
TRUE / FALSE | Boolean values for comparisons |
DM_SESSION_DD_LOCALE | Resolves best matching locale dynamically |
Conclusion
DQL special keywords provide dynamic and context-aware querying capabilities, making it easier to write flexible and intelligent queries without hardcoding values.