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

Bug: IF NOT EXISTS not working for define event #3685

Closed
2 tasks done
kotolex opened this issue Mar 13, 2024 · 2 comments
Closed
2 tasks done

Bug: IF NOT EXISTS not working for define event #3685

kotolex opened this issue Mar 13, 2024 · 2 comments
Labels
bug Something isn't working triage This issue is new

Comments

@kotolex
Copy link

kotolex commented Mar 13, 2024

Describe the bug

when using IF NOT EXISTS we still gets an error back

Steps to reproduce

  1. run db
  2. execute DEFINE EVENT email_tndfyr ON TABLE user WHEN $before.email != $after.email THEN (CREATE event SET user = $value.id, time = time::now(), value = $after.email);
  3. execute DEFINE EVENT IF NOT EXISTS email_tndfyr ON TABLE user WHEN $before.email != $after.email THEN (CREATE event SET user = $value.id, time = time::now(), value = $after.email);

Expected behaviour

expects nothing will happen, as event already exists, no errors back to me

SurrealDB version

1.3.0 for win10

Contact Details

lexman2@yandex.ru

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
@kotolex kotolex added bug Something isn't working triage This issue is new labels Mar 13, 2024
@kotolex
Copy link
Author

kotolex commented Mar 13, 2024

same for define user. Hmmm... what is the expected behavior for define statement with IF NOT EXISTS when entity already exists?

@kotolex
Copy link
Author

kotolex commented Mar 13, 2024

i get it )

@kotolex kotolex closed this as completed Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage This issue is new
Projects
None yet
Development

No branches or pull requests

1 participant