Skip to content

Prototype of using op.param with wordQuery#1928

Draft
rjrudin wants to merge 1 commit intodevelopfrom
feature/cts-param
Draft

Prototype of using op.param with wordQuery#1928
rjrudin wants to merge 1 commit intodevelopfrom
feature/cts-param

Conversation

@rjrudin
Copy link
Contributor

@rjrudin rjrudin commented Mar 27, 2026

At least with the nightly build as of 2026-03-26, this either is not yet supported by the build or it's not known what the serialization should look like. You can try this in query console against the java-unit-test database:

const op = require("/MarkLogic/optic");

const thePlan = {
  "$optic" : {
    "ns" : "op",
    "fn" : "operators",
    "args" : [ {
      "ns" : "op",
      "fn" : "from-view",
      "args" : [ {
        "ns" : "xs",
        "fn" : "string",
        "args" : [ "opticUnitTest" ]
      }, {
        "ns" : "xs",
        "fn" : "string",
        "args" : [ "musician" ]
      }, {
        "ns" : "xs",
        "fn" : "string",
        "args" : [ "" ]
      } ]
    }, {
      "ns" : "op",
      "fn" : "where",
      "args" : [ {
        "ns" : "cts",
        "fn" : "word-query",
        "args" : [ {
          "ns" : "op",
          "fn" : "param",
          "args" : [ {
            "ns" : "xs",
            "fn" : "string",
            "args" : [ "myName" ]
          } ]
        } ]
      } ]
    } ]
  }
};

op.import(thePlan)

And that will return an error of:

cannot resolve function for import: ${ns}.${name}`); -- Invalid arguments: cannot resolve function for import: cts.wordQuery

@github-actions
Copy link

github-actions bot commented Mar 27, 2026

Copyright Validation Results
Total: 3 | Passed: 3 | Failed: 0 | Skipped: 0 | at: 2026-03-27 00:42:56 UTC | commit: f52ebbc

✅ Valid Files

  • marklogic-client-api/src/main/java/com/marklogic/client/expression/CtsExpr.java
  • marklogic-client-api/src/main/java/com/marklogic/client/impl/CtsExprImpl.java
  • marklogic-client-api/src/test/java/com/marklogic/client/test/rows/CtsParamTest.java

✅ All files have valid copyright headers!

@rjrudin rjrudin force-pushed the feature/cts-param branch from 4fb918d to f52ebbc Compare March 27, 2026 00:42
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.

1 participant