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

A FunctionCall cannot be used in .column_as() because it does not implement IntoSimpleExpr #1601

Closed
mohs8421 opened this issue Apr 16, 2023 · 2 comments · May be fixed by #1613
Closed

A FunctionCall cannot be used in .column_as() because it does not implement IntoSimpleExpr #1601

mohs8421 opened this issue Apr 16, 2023 · 2 comments · May be fixed by #1613
Assignees

Comments

@mohs8421
Copy link
Contributor

Description

When trying to use Sea-Query features as the Function enum in an entity select statement, it doesn't compile, because the resulting FunctionCall does not implement IntoSimpleExpr.

Steps to Reproduce

  1. Call any Entity::find()
  2. Add any .column() function, and insert some Function::… call.
  3. Try to compile

Expected Behavior

When I have an abstraction layer, that offers it's services, I don't want to return to using custom expressions everywhere. If that is the case, I don't need that abstraction layer.

Versions

0.11

@billy1624
Copy link
Member

Hey @mohs8421, thanks for the report! I notice this problem as well sometime last week. Now I just created a PR to enhance it. Feel free to check :)

@tyt2y3
Copy link
Member

tyt2y3 commented Aug 4, 2023

Now that we have expr_as I think the issue is solved already.

@tyt2y3 tyt2y3 closed this as completed Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants