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

Avoid throwing an exception when the length of the params list is zero #91

Closed
MrDave1999 opened this issue Jan 11, 2024 · 0 comments · Fixed by #93
Closed

Avoid throwing an exception when the length of the params list is zero #91

MrDave1999 opened this issue Jan 11, 2024 · 0 comments · Fixed by #93
Labels
breaking change A change in one part of a library that potentially causes other components to fail loader Issue or pull request related to SQL files loader
Milestone

Comments

@MrDave1999
Copy link
Member

MrDave1999 commented Jan 11, 2024

The SQL file loader should not throw an exception in this case, since it is not an error, i.e. if the consumer passes an empty collection as argument, then the expected behavior is to return an empty dictionary without SQL statements.

This also facilitates integration with the plugin-based architecture, since the host application can decide not to load any plugins, so the host application would be passing to the SQL file loader an empty collection as argument and the expected behavior is not to throw an exception, but to return to the consumer an empty dictionary without SQL statements.

This also avoid tests from failing from PR #89.
See the jobs: https://github.com/ose-net/yesql.net/actions/runs/7496291700/job/20408051876#step:4:223

@MrDave1999 MrDave1999 added loader Issue or pull request related to SQL files loader breaking change A change in one part of a library that potentially causes other components to fail labels Jan 11, 2024
@MrDave1999 MrDave1999 added this to the Working Set milestone Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change A change in one part of a library that potentially causes other components to fail loader Issue or pull request related to SQL files loader
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant