Add the ORACLE query for doListUsersWithID#4585
Conversation
doListUsersWithIDdoListUsersWithID
📝 WalkthroughSummary by CodeRabbitRelease Notes
WalkthroughThis PR adds Oracle-specific constants and default SQL implementations for paginated user filter queries with user ID selection across the JDBC realm utilities, including both standard and case-insensitive variants. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
AI Agent Log Improvement Checklist
- The log-related comments and suggestions in this review were generated by an AI tool to assist with identifying potential improvements. Purpose of reviewing the code for log improvements is to improve the troubleshooting capabilities of our products.
- Please make sure to manually review and validate all suggestions before applying any changes. Not every code suggestion would make sense or add value to our purpose. Therefore, you have the freedom to decide which of the suggestions are helpful.
✅ Before merging this pull request:
- Review all AI-generated comments for accuracy and relevance.
- Complete and verify the table below. We need your feedback to measure the accuracy of these suggestions and the value they add. If you are rejecting a certain code suggestion, please mention the reason briefly in the suggestion for us to capture it.
| Comment | Accepted (Y/N) | Reason |
|---|---|---|
| #### Log Improvement Suggestion No: 1 | ||
| #### Log Improvement Suggestion No: 2 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@core/org.wso2.carbon.user.core/src/main/java/org/wso2/carbon/user/core/jdbc/JDBCRealmConstants.java`:
- Around line 231-234: The SQL constant
GET_USER_FILTER_PAGINATED_WITH_USER_ID_SQL_ORACLE is correct for Oracle
pagination, but the PR/commit title incorrectly references MSSQL; update the
commit/PR title and description to accurately reflect this Oracle-specific
change (suggested title: "add oracle query for doListUsersWithID") so history
and backports aren’t confused—no code changes needed, just amend the PR/commit
metadata to mention Oracle and doListUsersWithID.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro
Run ID: a75e2bb1-a0ae-4a5f-bb52-4672d67c2565
📒 Files selected for processing (3)
core/org.wso2.carbon.user.core/src/main/java/org/wso2/carbon/user/core/jdbc/JDBCRealmConstants.javacore/org.wso2.carbon.user.core/src/main/java/org/wso2/carbon/user/core/jdbc/caseinsensitive/JDBCCaseInsensitiveConstants.javacore/org.wso2.carbon.user.core/src/main/java/org/wso2/carbon/user/core/util/JDBCRealmUtil.java
|
PR builder started |
|
PR builder completed |
jenkins-is-staging
left a comment
There was a problem hiding this comment.
Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/24764115915
Purpose
In
UniqueIDJDBCUserStoreManager, thedoListUsersWithIDmethod is invoked when listing users with a username filter and pagination. Although Oracle-specific offset and limit handling has been addressed [1], there is no Oracle-specific query in the default query list. As a result, the fallback queries [2], [3] are used, which includeLIMITandOFFSETclauses that are not supported by Oracle. This PR adds the appropriate Oracle query to resolve this issue.[1] -
carbon-kernel/core/org.wso2.carbon.user.core/src/main/java/org/wso2/carbon/user/core/jdbc/UniqueIDJDBCUserStoreManager.java
Lines 3469 to 3471 in 4d63763
[2] -
carbon-kernel/core/org.wso2.carbon.user.core/src/main/java/org/wso2/carbon/user/core/jdbc/UniqueIDJDBCUserStoreManager.java
Lines 3476 to 3478 in 4d63763
[3] -
carbon-kernel/core/org.wso2.carbon.user.core/src/main/java/org/wso2/carbon/user/core/jdbc/JDBCRealmConstants.java
Lines 202 to 203 in 4d63763
Related Issue