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

Backend work for Mathesar email custom type. #409

Closed
Tracked by #245
kgodey opened this issue Jul 16, 2021 · 4 comments · Fixed by #556
Closed
Tracked by #245

Backend work for Mathesar email custom type. #409

kgodey opened this issue Jul 16, 2021 · 4 comments · Fixed by #556
Assignees
Labels
ready Ready for implementation type: enhancement New feature or request work: backend Related to Python, Django, and simple SQL

Comments

@kgodey
Copy link
Contributor

kgodey commented Jul 16, 2021

This issue is to create a custom MATHESAR_TYPES.EMAIL data type to handle email addresses.

As part of this issue, we need to ensure that:

  • The type should be case-insensitive at the DB layer (currently it's not)
  • Our custom type is named MATHESAR_TYPES.EMAIL in the API (currently it's lowercase)
  • Users can use the API to change a column to MATHESAR_TYPES.EMAIL if it's possible to do so (this should already be implemented).
  • Automatic type inference during file import suggests MATHESAR_TYPES.EMAIL when it makes sense to do so (this should already be implemented).

Additional Context

@kgodey kgodey added good first issue Everything in "Help wanted", PLUS being relatively easy and straightforward to implement. help wanted Community contributors can implement this ready Ready for implementation type: enhancement New feature or request work: backend Related to Python, Django, and simple SQL work: database labels Jul 16, 2021
@kgodey kgodey added this to the 07. Initial Data Types milestone Jul 16, 2021
@nishit-prasad
Copy link

Hello, I am new and learning Python/Django as I go forward. Can I take this up?

Will be reviewing docs and other stuff to get things going and started.

@kgodey
Copy link
Contributor Author

kgodey commented Jul 17, 2021

@nishit-prasad This issue requires knowledge of Postgres custom types and SQLAlchemy, so it might not be the best issue if you're currently learning Python/Django. I'd recommend starting with something related to the Django code like #364

@kgodey kgodey changed the title Create MATHESAR_EMAIL custom type and handle it in the backend. Backend work for MATHESAR_EMAIL custom type. Jul 18, 2021
@mathemancer
Copy link
Contributor

Regarding naming, the email type is currently residing in a mathesar_types schema that exists solely to hold custom type definitions and associated functions. I suggest sticking with that unless there's a really good reason to change. Note that if we want to use unqualified type names, we'll need to install each type in each schema unless we want to use an extension installation process. Further, if a user then creates a schema, we'll need to add the custom types, and all associated functions to that schema, etc.

Thus, the proper name for the email type is mathesar_types.email.

@kgodey
Copy link
Contributor Author

kgodey commented Jul 19, 2021

@mathemancer I think that's fine, my main concern was namespacing. I'll update the issue.

@kgodey kgodey changed the title Backend work for MATHESAR_EMAIL custom type. Backend work for Mathesar email custom type. Jul 19, 2021
@kgodey kgodey removed the good first issue Everything in "Help wanted", PLUS being relatively easy and straightforward to implement. label Jul 20, 2021
@kgodey kgodey removed the help wanted Community contributors can implement this label Aug 10, 2021
@kgodey kgodey assigned kgodey and unassigned eito-fis Aug 10, 2021
@mathemancer mathemancer self-assigned this Aug 11, 2021
@mathemancer mathemancer mentioned this issue Aug 13, 2021
7 tasks
@kgodey kgodey removed their assignment Aug 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready Ready for implementation type: enhancement New feature or request work: backend Related to Python, Django, and simple SQL
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

4 participants