ArcadeDB Version: ArcadeDB Server v23.3.1 (build da609e4/1680693032550/main)
JDK Version: Running on Mac OS X 12.6.4 - OpenJDK 64-Bit Server VM Homebrew
The embedded link is a scalar data type, but has no explicit asLink() conversion method. Of course, one can use
but I think it would be more consistent if there was an asLink() method. This method is useful when filtering against "known" RIDs which would be given as strings and the type needs to be converted to "link" for a comparison. Note, that alternatively the other side of the comparison cannot necessarily be converted to a string, for example, in case of a list-of-links property.
Example:
CREATE DOCUMENT TYPE doc;
INSERT INTO doc SET name = 'Hi';
INSERT INTO doc SET name = 'Ho', link = [#1:0];
SELECT name FROM doc WHERE intersect(link,[#1:0]) <> [] -- This works
SELECT name FROM doc WHERE intersect(link,["#1:0"]) <> [] -- This does not work
SELECT name FROM doc WHERE intersect(link,["#1:0".convert('LINK')]) <> [] -- This works
SELECT name FROM doc WHERE intersect(link,["#1:0".asLink()]) <> [] -- This could work with asLink()
ArcadeDB Version: ArcadeDB Server v23.3.1 (build da609e4/1680693032550/main)
JDK Version: Running on Mac OS X 12.6.4 - OpenJDK 64-Bit Server VM Homebrew
The embedded link is a scalar data type, but has no explicit
asLink()conversion method. Of course, one can usebut I think it would be more consistent if there was an
asLink()method. This method is useful when filtering against "known" RIDs which would be given as strings and the type needs to be converted to "link" for a comparison. Note, that alternatively the other side of the comparison cannot necessarily be converted to a string, for example, in case of a list-of-links property.Example: