MLE-27883 adapt cts.param in the Optic API for MLS 12.1#1075
Open
RitaChen609 wants to merge 3 commits into
Open
MLE-27883 adapt cts.param in the Optic API for MLS 12.1#1075RitaChen609 wants to merge 3 commits into
RitaChen609 wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds Optic plan builder support for cts.param() (MarkLogic Server 12.1) so CTS query constructors can accept parameterized values via op.cts.param(name) and serialize them with ns:"cts".
Changes:
- Introduces a new
CtsParamserver type and exposesop.cts.param()on the plan builder. - Extends multiple CTS query function argument validators to accept
types.CtsParamwhere values/options can be parameterized. - Adds TypeScript no-server “runtime smoke” tests and MarkLogic 12.1 integration tests covering plan construction, serialization, and one live execution with bindings.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test-typescript/optic-cts-param-runtime.test.ts | Adds no-server smoke tests to validate plan construction + exported JSON shape for cts.param. |
| test-basic/optic-cts-param-test.js | Adds integration coverage for cts.param bindings and negative cases vs op.param. |
| lib/server-types-generated.js | Adds and exports CtsParam server type. |
| lib/plan-builder.js | Adds bldrgen.CtsExpr.prototype.param() that constructs types.CtsParam('cts','param', ...). |
| lib/plan-builder-generated.js | Updates CTS query function parameter type checks to accept types.CtsParam at targeted argument sites. |
jonmille
approved these changes
May 11, 2026
rjdew-progress
approved these changes
May 12, 2026
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.
Summary
server-types-generated.js: Added CtsParam class extending ServerType; exported it
plan-builder.js: Added bldrgen.CtsExpr.prototype.param function
plan-builder-generated.js: Added types.CtsParam as accepted type at 19 CTS function parameter sites
optic-cts-param-runtime.test.ts: New file — 30 smoke tests (no server required)
optic-cts-param-test.js: New file — 11 integration tests (1 live server call; 10 local plan-construction/negative tests)
Smoke tests (no server, test-typescript):
Integration tests (test-basic, requires MarkLogic 12.1):
Verification steps:
Smoke tests (instant, no server needed)
Integration tests (requires MarkLogic 12.1)