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

QueryDefinition: Adds API to get query parameters #2210

Merged
merged 3 commits into from
Feb 11, 2021

Conversation

thomaslevesque
Copy link
Contributor

@thomaslevesque thomaslevesque commented Feb 10, 2021

Description

Expose the parameters of a QueryDefinition as a list of tuples

This PR also introduces a small unrelated optimization to QueryDefinition, as a separate commit (so I can easily remove it from this PR if requested)

Type of change

  • New feature (non-breaking change which adds functionality)

Closing issues

Closes #2191
Closes #796
Supersedes #802

public IReadOnlyList<(string Name, object Value)> GetQueryParameters()
{
return this.parametersAdapter ??= new ParametersListAdapter(this);
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I exposed the parameters through a method because that's the API we agreed upon, but I think it might be more natural to expose them as a property.

If you agree, I can make that change. The name Parameters is already taken by an internal property, so we could either rename the existing property, or find another name for the new one (I lean toward the former).

@j82w
Copy link
Contributor

j82w commented Feb 11, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@j82w j82w changed the title Expose query parameters QueryDefinition: Adds API to get query parameters Feb 11, 2021
@j82w
Copy link
Contributor

j82w commented Feb 11, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

Copy link
Contributor

@sboshra sboshra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

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.

Expose Query Parameters Expose QueryDefinition parameters
4 participants