Skip to content

Weird erroring behavior with params/sqlscript variables and SELECT FROM #2350

@ExtReMLapin

Description

@ExtReMLapin

Hello, on release 25.5.1

We're trying to port some of our code from Cypher to SQLSCRIPT.

I have the following code that works when sent thru REST API :

LET $source = (SELECT FROM :__rid);
return $source

With params : {'__rid': '#1:143'}

It returns : [{'@rid': '#1:143', '@type': 'CHUNK', '@cat': 'v'}]


In studio I tried the following :

LET $source_id = '#1:143';
LET $source = (SELECT FROM $source_id);

RETURN [$source_id, $source]

"com.arcadedb.query.sql.executor.ExecutionStepInternal.syncPull(com.arcadedb.query.sql.executor.CommandContext, int)" because "this.lastStep" is null

LET $batch_in = [{'source_id': '#1:143', 'target_id': '#4:0', 'features': {}, 'relation_type': 'in'}];
LET $source = (SELECT FROM $batch_in[0].source_id);

RETURN [$batch_in[0].source_id, $source]

Image

What the hell am I doing wrong ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions