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

Query: Add support for custom EntityQueryables #17001

Closed
wants to merge 1 commit into from

Conversation

smitpatel
Copy link
Member

This makes look up for EntityQueryable in query tree bit more complex but it adds support for providers to add custom EntityQueryable to carry more metadata as needs to and allow rest of the pipeline to be transparent about it.
Current FromSql has be to converted during compilation phase since, we want to parameterize the arguments array in the methodCall.
If there is nothing to parameterize then providers can directly create custom Queryable.

Resolves #16326

This makes look up for EntityQueryable in query tree bit more complex but it adds support for providers to add custom EntityQueryable to carry more metadata as needs to and allow rest of the pipeline to be transparent about it.
Current FromSql has be to converted during compilation phase since, we want to parameterize the arguments array in the methodCall.
If there is nothing to parameterize then providers can directly create custom Queryable.

Resolves #16326
@smitpatel
Copy link
Member Author

It failed to capture one particular case. (See #13346)
i.e. if the defining has FromSql then we need to run visitor to convert FromSql when expanding navigations. Again the information about this visitor won't be available in core level.

Another thing is, parameters passed to FromSql needs to be funcletized. Else we could just create FromSqlEntityQueryable from start when the method is called. Doing the later would mean that funcletizer needs to know about relational specific entity queryable.

For now, we should just pattern match on method name in core for FromSql and process it accordingly in core. It is somewhat hacky but this is only 1 method and any solution involves a lot of changes to allow this to work.
Closing this.

@smitpatel smitpatel closed this Aug 8, 2019
@smitpatel smitpatel deleted the smit/fromSqlEntityQueryable branch August 8, 2019 16:58
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 this pull request may close these issues.

Query: query filters should be properly composed on top of FromSql
1 participant