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

Naming convention for boolean columns #74

Closed
vanillajonathan opened this issue May 27, 2021 · 3 comments
Closed

Naming convention for boolean columns #74

vanillajonathan opened this issue May 27, 2021 · 3 comments

Comments

@vanillajonathan
Copy link
Contributor

How should boolean columns be named?

Should they have any prefix or suffix such as "has", "can", "is" or should that be avoided?

Example "admin" could be "is_admin".

@treffynnon
Copy link
Owner

I wouldn't include the prefix here. The column type is clear that there are only two possible values - true and false - so I would call the column admin or enabled or whatever.

@vanillajonathan
Copy link
Contributor Author

Okay, but date columns have the "date" suffix which could be argued that isn't needed since it should be clear what values are possible because of the column type.

@treffynnon
Copy link
Owner

Agreed. That is there for compatibility with the book from memory.

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

No branches or pull requests

2 participants