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

Codegen for query_required_single() #476

Open
jrycw opened this issue Feb 8, 2024 · 0 comments
Open

Codegen for query_required_single() #476

jrycw opened this issue Feb 8, 2024 · 0 comments
Assignees
Labels
question Further information is requested

Comments

@jrycw
Copy link

jrycw commented Feb 8, 2024

Currently, it appears that the code generation process will not generate a query using query_required_single().

After examining the _generate() function situated at edgedb-python/edgedb/codegen/generator.py, it appears there might be an if-else statement that determines the method to use:

if dr.output_cardinality.is_multi():
method = "query"
rt = "return "
elif dr.output_cardinality == edgedb.Cardinality.NO_RESULT:
method = "execute"
rt = ""
else:
method = "query_single"
rt = "return "

Could insights be provided into the rationale behind this decision?

@raddevon raddevon added the question Further information is requested label Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants