Skip to content

Conversation

@rjrudin
Copy link
Contributor

@rjrudin rjrudin commented Dec 3, 2025

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!

Copilot AI review requested due to automatic review settings December 3, 2025 19:34
Copy link

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

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 transformParams option to the write() 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.

@github-actions
Copy link

github-actions bot commented Dec 3, 2025

Copyright Validation Results
Total: 2 | Passed: 2 | Failed: 0 | Skipped: 0 | at: 2025-12-03 19:37:43 UTC | commit: e7dd6cf

✅ Valid Files

  • lib/transforms.js
  • test-basic/documents-transform.js

✅ 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!
@rjrudin rjrudin force-pushed the feature/transform-params branch from 4346c92 to e7dd6cf Compare December 3, 2025 19:37
@rjrudin rjrudin merged commit 98aa743 into develop Dec 3, 2025
6 checks passed
@rjrudin rjrudin deleted the feature/transform-params branch December 3, 2025 20:08
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.

3 participants