MLE-27881 Add cts.param support to Java Client API#1936
Open
rjdew-progress wants to merge 1 commit intodevelopfrom
Open
MLE-27881 Add cts.param support to Java Client API#1936rjdew-progress wants to merge 1 commit intodevelopfrom
rjdew-progress wants to merge 1 commit intodevelopfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds Java Optic API support for cts:param() so callers can place placeholders inside cts expressions, and adds a client-side guard to reject op:param() when it is passed into cts calls.
Changes:
- Added
cts:param(...)to the publicCtsExprAPI and its implementation. - Added validation in the shared expression-call path to reject
op:param()insidects:*calls with a targeted error. - Added a new unit test covering AST export for
cts:param()and the new rejection path, plus repository copilot instructions.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
marklogic-client-api/src/test/java/com/marklogic/client/impl/CtsParamExprTest.java |
Adds unit coverage for exported cts:param() AST and the new op:param() rejection. |
marklogic-client-api/src/main/java/com/marklogic/client/impl/PlanBuilderSubImpl.java |
No behavioral change; whitespace-only edit near existing op:param() implementation. |
marklogic-client-api/src/main/java/com/marklogic/client/impl/CtsExprImpl.java |
Implements new cts:param(...) overloads and adds a new helper class at the end of the file. |
marklogic-client-api/src/main/java/com/marklogic/client/impl/BaseTypeImpl.java |
Adds centralized validation to block op:param() from being nested inside cts calls. |
marklogic-client-api/src/main/java/com/marklogic/client/expression/CtsExpr.java |
Exposes cts:param(...) in the public Java API. |
.github/copilot-instructions.md |
Adds repository-specific Copilot/build/test guidance. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The commit adds cts:param() support to the Optic Java API — a new way to pass parameter placeholders in the cts namespace — and adds a guard to reject misuse of op:param() inside cts expressions.