-
Notifications
You must be signed in to change notification settings - Fork 15
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
runQuery argument fails when there are multiple steps with the same name #81
Comments
Thanks for flagging! We should probably raise an "ambiguous runQuery argument" error? |
I like the idea of an ambiguous runQuery exception! |
I'd raise this error only when the step + query combination doesn't point to a single query. In my use case, even though I had multiple steps with the same name, the query name was unique. I'd expect SQL runner to run that query. Does that make sense? |
I guess I would argue that a step should be unique - and that if you had two or more steps with the same name but different operations that you are introducing ambiguity and debug difficulty. If a step does fundamentally different things then it should have a different name otherwise the step name has lost its meaning. All that being said I would love to hear the use-case for having multiple steps with the same name? |
I used it to run queries that belong to the same context, but are not independent and can't be run in parallel. Quick example is the session data model. Guess it makes sense to have different names, though.
|
It's a corner case, but I thought it was worth reporting. When you have 2+ steps with the same name, the runQuery argument only looks for the specified query within the first step. It fails to find a query that is in the second step, for example.
The text was updated successfully, but these errors were encountered: