Skip to content

Check why we avoid parameterizing indexer method parameters in the funcletizer #34733

Description

@roji

We have the following code in ExpressionTreeFuncletizer:

private bool IsParameterParameterizable(MethodInfo method, ParameterInfo parameter)
    => parameter.GetCustomAttribute<NotParameterizedAttribute>() is null
        && !_model.IsIndexerMethod(method);

... which means that we constantize arguments to what we identify as indexers (also not sure why the model needs to be involved in determining that something is an indexer...).

For example, this prevents parameters from being parameterized when using the PostgreSQL hstore type, which maps to Dictionary<string, string> (see npgsql/efcore.pg#3285 (comment)).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions