MLE-25579 Can now specify transform params when writing a transform#1043
Merged
MLE-25579 Can now specify transform params when writing a transform#1043
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds support for specifying transform parameters with their XQuery types when registering transforms in MarkLogic. Previously, transform parameters were undocumented in the API; now developers can explicitly declare parameter names and their XQuery SequenceType declarations (e.g., xs:string?, xs:integer*) when writing a transform.
Key Changes:
- Added
transformParamsoption to thewrite()method for declaring typed transform parameters - Transform parameters are now URL-encoded with the
trans:prefix in the registration endpoint - Enhanced test coverage to verify parameter registration and retrieval via the list endpoint
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| lib/transforms.js | Added transformParams parameter to write() method with JSDoc documentation and implementation to encode parameters in the request URL |
| test-basic/documents-transform.js | Added test data with transformParams and assertions to verify parameters are correctly registered and retrievable via the list endpoint |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Copyright Validation Results ✅ Valid Files
✅ All files have valid copyright headers! |
When transforms did lack the power to declare What parameters they would deign to receive, Developers were left in dark despair, With undocumented args they could not believe. But lo! transformParams now graces the write, A simple object of name and type pairs, From xs:string? to xs:integer's might, The query string now carries all affairs. trans:flag and trans:count now ride along, URL-encoded, proper, clean, and true, The list endpoint sings a validating song, Confirming params registered on cue. So merge this branch with confidence and cheer, For typed transform params are finally here!
4346c92 to
e7dd6cf
Compare
BillFarber
approved these changes
Dec 3, 2025
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.
When transforms did lack the power to declare
What parameters they would deign to receive,
Developers were left in dark despair,
With undocumented args they could not believe.
But lo! transformParams now graces the write,
A simple object of name and type pairs,
From xs:string? to xs:integer's might,
The query string now carries all affairs.
trans:flag and trans:count now ride along,
URL-encoded, proper, clean, and true,
The list endpoint sings a validating song,
Confirming params registered on cue.
So merge this branch with confidence and cheer,
For typed transform params are finally here!