Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Allow dynamic creation of both nodes and edges in relate statements #3921

Open
2 tasks done
nathanschwarz opened this issue Apr 19, 2024 · 0 comments
Open
2 tasks done
Assignees
Labels
feature New feature or request topic:surrealql This is related to the SurrealQL query language

Comments

@nathanschwarz
Copy link

nathanschwarz commented Apr 19, 2024

Original: Bug: RELATE statement with either a non existing IN / OUT edge should through an error and not make the insertion

Describe the bug

Running a RELATE statement with non existing nodes create a record in the edge and node tables, and do not throw.

Steps to reproduce

run the following queries :

RELATE person:i_do_not_exist->wrote->article:I_exist_or_not;
SELECT * FROM wrote;

will yield a result :

{
        "id": "wrote:doqgupvy005mpnlrs25j",
        "in": "person:i_do_not_exist",
        "out": "article:I_exist_or_not"
}

Expected behaviour

The relate statement should check that both edges exists before inserting in the relation table, and throw if one of the record is not found.

SurrealDB version

surrealDB 1.4 running in a docker container on Mac OS

Is there an existing issue for this?

  • I have searched the existing issues

Code of Conduct

  • I agree to follow this project's Code of Conduct
@nathanschwarz nathanschwarz added bug Something isn't working triage This issue is new labels Apr 19, 2024
@phughk phughk changed the title Bug: RELATE statement with either a non existing IN / OUT edge should through an error and not make the insertion Feature: Allow dynamic creation of both nodes and edges in relate statements May 13, 2024
@phughk phughk added feature New feature or request topic:surrealql This is related to the SurrealQL query language and removed bug Something isn't working triage This issue is new labels May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request topic:surrealql This is related to the SurrealQL query language
Projects
None yet
Development

No branches or pull requests

3 participants