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

Arrays of enum values cannot be used in parameters #408

Closed
stealth-toucan opened this issue Dec 27, 2022 · 1 comment · Fixed by #431
Closed

Arrays of enum values cannot be used in parameters #408

stealth-toucan opened this issue Dec 27, 2022 · 1 comment · Fixed by #431

Comments

@stealth-toucan
Copy link

This works:

client.query("select <schema::Cardinality>$param;", param="One")

This does not work:

client.query("select <array<schema::Cardinality>>$param;", param=["One"])

This behavior is inconsistent. The issue can be worked around using a double cast, but the DX is not ideal.

  • EdgeDB version: 2.9
  • edgedb-python version: 1.2.0
@ccsv
Copy link

ccsv commented Jan 20, 2023

I ran into this problem too. My solution (for now) was use a string instead.

fantix added a commit that referenced this issue May 26, 2023
Changes
=======

* Update for rules of instance names (#423)
  (by @fantix in 5bc5699 for #420)

* Synchronize error types (#429)
  (by @fantix in 03e4012)

* Allow enums in array codec (#431)
  (by @fantix in 2de7e3f for #408)

* Prohibit concurrent operations on the same transaction object (#430)
  (by @fantix in f1fa612 for #130)

* Fix state of transaction start (#424)
  (by @fantix in 297de72)

* codegen: Handle non-identifier characters in enum values (#432)
  (by @fantix in e1ec16d for #428)

Docs
====

* docs: add Code Generation to table of contents (#421)
  (by @AndreasPB in ffe74a1 for #421)
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

Successfully merging a pull request may close this issue.

2 participants