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

SqlFeatureToggle - generic config #152

Open
ximon opened this issue Jan 5, 2018 · 2 comments
Open

SqlFeatureToggle - generic config #152

ximon opened this issue Jan 5, 2018 · 2 comments

Comments

@ximon
Copy link

ximon commented Jan 5, 2018

Currently the SqlFeatureToggle requires a connection string / connection string name and a SQL statement per toggle.

When multiple toggles are implemented it would be nicer to be able to provide a generic SqlFeatureToggle connection string / connection string name and SQL statement - this can be selected as a fallback so that the specific keys are selected, then the generic one.

Instead of the following:

<add key="FeatureToggle.MyAwesomeFeature1.ConnectionStringName" value="Database" />
<add key="FeatureToggle.MyAwesomeFeature1.SqlStatement" value="select Value from Toggle where ToggleName = 'MyAwesomeFeature1'"/>

<add key="FeatureToggle.MyAwesomeFeature2.ConnectionStringName" value="Database" />
<add key="FeatureToggle.MyAwesomeFeature2.SqlStatement" value="select Value from Toggle where ToggleName = 'MyAwesomeFeature2'"/>

<add key="FeatureToggle.MyAwesomeFeature2.ConnectionStringName" value="Database" />
<add key="FeatureToggle.MyAwesomeFeature2.SqlStatement" value="select Value from Toggle where ToggleName = 'MyAwesomeFeature3'"/>

Have this:

<add key="FeatureToggle.SqlFeatureToggle.ConnectionStringName" value="Database" />
<add key="FeatureToggle.SqlFeatureToggle.SqlStatement" value="select Value from Toggle where ToggleName = '{name}'"/>

I can submit a PR if required.

@ximon ximon changed the title SqlFeatureToggle - shared config SqlFeatureToggle - generic config Jan 5, 2018
@jason-roberts jason-roberts added this to the SomeFutureVersion milestone Feb 15, 2018
@jason-roberts
Copy link
Owner

Hi @ximon thanks for the suggestion, please hold of on the PR for the moment as I want to consider v5 and how that may affect toggle configuration.

@andregeuze
Copy link

@jason-roberts Hi Jason, any update on this topic?

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

No branches or pull requests

3 participants