Skip to content

Logical AND operator in Javascript function prevents successful definition #2161

@DMCTowns

Description

@DMCTowns

Using a fresh demo install of Arcade DB (playwithdata):

docker run --rm -p 2480:2480 -p 2424:2424
           -e JAVA_OPTS="-Darcadedb.server.rootPassword=playwithdata -Darcadedb.server.defaultDatabases=Imported[root]{import:https://github.com/ArcadeData/arcadedb-datasets/raw/main/orientdb/OpenBeer.gz}"
           arcadedata/arcadedb:latest

Creating a function via the UI: http://localhost:2480/

This works:

DEFINE FUNCTION DataCollectionEntity.getMatchRating "return 1==1" PARAMETERS [a,b] LANGUAGE js

This doesn't work:

DEFINE FUNCTION DataCollectionEntity.getMatchRating "return 1==1 && 0==0" PARAMETERS [a,b] LANGUAGE js

and results in the server log:

SEVER [PostCommandHandler] <ArcadeDB_0> Error on command execution (PostCommandHandler): Error on definition of function 'getMatchRating'

The presence of the logical AND (&&) operator appears to prevent the function being defined

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions