Skip to content

MLE-27881 Add cts.param support to Java Client API#1936

Open
rjdew-progress wants to merge 1 commit intodevelopfrom
MLE-27881
Open

MLE-27881 Add cts.param support to Java Client API#1936
rjdew-progress wants to merge 1 commit intodevelopfrom
MLE-27881

Conversation

@rjdew-progress
Copy link
Copy Markdown

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.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 public CtsExpr API and its implementation.
  • Added validation in the shared expression-call path to reject op:param() inside cts:* 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.

Comment thread marklogic-client-api/src/main/java/com/marklogic/client/impl/CtsExprImpl.java Outdated
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