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

Calling user defined function in abstract constraint produces "function does not exist" #7134

Open
dnwpark opened this issue Mar 28, 2024 · 1 comment

Comments

@dnwpark
Copy link
Contributor

dnwpark commented Mar 28, 2024

Given the schema:

  function my_check(val: str) -> bool {
    using (
      contains(val,'a')
    );
  }
  abstract constraint bad_constraint(blah: str) {
      using (my_check(blah));
  }

The following error is produced:

edgedb error: InvalidReferenceError: function 'default::my_check' does not exist
@dnwpark
Copy link
Contributor Author

dnwpark commented Mar 28, 2024

Possibly related error happens when using a global in a constraint

  global blah := 'blah';

  abstract constraint bad_constraint(val: str) {
      using (val = default::blah);
  }
error: object type or alias 'default::blah' does not exist
   │
19 │       using (val = default::blah);
   │                    ^^^^^^^^^^^^^ did you mean 'default::blah'?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant