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

Databases should not have a public way to "Get" without "TryGet" #1

Open
WispyMouse opened this issue Nov 12, 2024 · 0 comments
Open
Labels
database Relates to the "Database" lookup of Cards, Status Effects, etc. identified-in-tests Notates that a work item or issue was detected in relation to the Tests effort.

Comments

@WispyMouse
Copy link
Owner

Databases have a "TryGet" and a "Get" by convention. At time of writing, "Get" methods are public. This runs the risk of users calling "Get" directly on things that do not exist. This will result in an exception being thrown.

Only "TryGet" methodology should be public. The other methods should be internal or private, or removed if not necessary.

@WispyMouse WispyMouse added database Relates to the "Database" lookup of Cards, Status Effects, etc. identified-in-tests Notates that a work item or issue was detected in relation to the Tests effort. labels Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
database Relates to the "Database" lookup of Cards, Status Effects, etc. identified-in-tests Notates that a work item or issue was detected in relation to the Tests effort.
Projects
None yet
Development

No branches or pull requests

1 participant