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

Implementation for email data type #245

Closed
5 tasks done
kgodey opened this issue Jun 14, 2021 · 3 comments
Closed
5 tasks done

Implementation for email data type #245

kgodey opened this issue Jun 14, 2021 · 3 comments
Labels
pr-status: revision A PR awaiting follow-up work from its author after review type: meta List of related issues. Not meant to be worked on directly.

Comments

@kgodey
Copy link
Contributor

kgodey commented Jun 14, 2021

Problem

Users may want to store emails in their database and utilize functionality that is specific to email addresses such as validation and grouping. We should allow them to do so and implement this type appropriately in the backend.

Proposed solution

PostgreSQL does not have a built-in type to handle email addresses, so we will create a custom type that users can install if they want to use it.

Tasks that need to completed:

Additional context

@kgodey kgodey added type: enhancement New feature or request work: backend Related to Python, Django, and simple SQL work: database ready Ready for implementation labels Jun 14, 2021
@kgodey kgodey added this to the 8. Initial Data Types milestone Jun 14, 2021
@mathemancer
Copy link
Contributor

Note that this is already implemented at the DB level, and reflects properly in SQLAlchemy. We just need to make it possible to work with from the Column API and have some agreement about how the type should be represented in the API. (I.e., varchar is shown as VARCHAR in the API, but email would be mathesar_types.email if we use the same method for retrieving the type representation.)

Do we want to continue using the DB name for the types in the API, or come up with some kind of mapping to make them look better in the API? One detail is that if in the dim future we supported a different DB backend, the DB names even for some of the non-custom types would potentially change in the API.

@kgodey
Copy link
Contributor Author

kgodey commented Jun 18, 2021

I know some of this is already implemented, but I wanted to make a full checklist of what we need for this type to work properly.

I'll make a separate ticket for mapping types to the API, I think we'll need some way to map DB types to more human-friendly types.

@kgodey kgodey added status: detail needed ready Ready for implementation type: meta List of related issues. Not meant to be worked on directly. and removed ready Ready for implementation status: detail needed type: enhancement New feature or request labels Jul 15, 2021
@kgodey kgodey self-assigned this Aug 10, 2021
@kgodey kgodey added work: product and removed work: backend Related to Python, Django, and simple SQL work: database labels Sep 13, 2021
@kgodey kgodey removed their assignment Sep 13, 2021
@kgodey kgodey changed the title Backend/API implementation for email data type Implementation for email data type Sep 13, 2021
@kgodey kgodey added pr-status: revision A PR awaiting follow-up work from its author after review and removed ready Ready for implementation labels Mar 1, 2022
@kgodey
Copy link
Contributor Author

kgodey commented May 4, 2022

Closing this since all subtasks are done.

@kgodey kgodey closed this as completed May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-status: revision A PR awaiting follow-up work from its author after review type: meta List of related issues. Not meant to be worked on directly.
Projects
No open projects
Development

No branches or pull requests

2 participants