Skip to content

SYNTAX ERROR: WOQL.limit(...).evaluate is not a function #317

Open
@alexander-mart

Description

@alexander-mart

Describe the bug
Error on using evaluate() instead of eval() from terminusdb-dashboard

To Reproduce
Attempt to call evaluate() in chain-style from limit():

WOQL.limit(100).evaluate(WOQL.times(2,3), "v:result")

Return query-parser error:
SYNTAX ERROR: WOQL.limit(...).evaluate is not a function

But

WOQL.limit(100).eval(WOQL.times(2,3), "v:result")

Successful return:

[
  {
    "result": {
      "@type": "xsd:decimal",
      "@value": 6
    }
  }
]

Expected behavior

Return result:

[
  {
    "result": {
      "@type": "xsd:decimal",
      "@value": 6
    }
  }
]

Screenshots
...

Info (please complete the following information):

  • terminus-server from docker-compose: terminusdb/terminusdb-server:latest

Additional context

There is no mention of evaluate here:
https://github.com/terminusdb/terminusdb/blob/main/src/core/query/json_woql.pl

Or there:
https://github.com/search?q=repo%3Aterminusdb%2Fterminusdb%20evaluate&type=code

But this is answer to why is evaluate was not found:
https://github.com/terminusdb/terminusdb-client-js/blob/main/lib/woql.js#L487

because only eval WOQL-method is exist, and evaluate() is only alias to eval()

See more about math operators in documentation:
https://terminusdb.com/docs/maths-based-queries-in-woql/

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentationtriageissue to be triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions