Sitelet https://github.com/ArcadeData/arcadedb/issues/3813
Skip to content

SQL: UPDATE does not resolve expression/command resulting in RID #3813

Description

@gramian

ArcadeDB Server v26.4.1-SNAPSHOT (build 282725ea54332f623bbd1f39d022179ab6adfc38/1775535165300/main)

Running on Linux 6.17.0-19-generic - OpenJDK 64-Bit Server VM 25.0.3-ea

When using the UPDATE command with an expression or command yielding record identifier it cannot be used in as target of the update.

Given:

CREATE DOCUMENT TYPE Doc

These do not work:

UPDATE (INSERT INTO Doc RETURN @rid) SET b = 3 -- does not work
UPDATE (INSERT INTO Doc RETURN @rid).@rid[0] SET b = 3 -- does not work
UPDATE Doc SET b = 3 WHERE @rid = (INSERT INTO Doc RETURN @rid).@rid[0] -- does not work

In SQLscript, using a variable this partially works:

LET $x = INSERT INTO Doc RETURN @rid;
UPDATE Doc SET b = 3 WHERE @rid = $x.@rid[0]; -- works
LET $x = INSERT INTO Doc RETURN @rid;
UPDATE $x.@rid[0] SET b = 3; -- does not work

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions