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

CustomId #459

Open
steida opened this issue Aug 10, 2024 · 2 comments
Open

CustomId #459

steida opened this issue Aug 10, 2024 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@steida
Copy link
Contributor

steida commented Aug 10, 2024

Evolu should allow a custom ID if a developer knows it's globally unique. The problem is that Evolu ID generation is hardcoded into mutate and related functions. I think the best API is to allow CustomId in EvoluSchema and use conditional types to enforce passing it into create and createOrUpdate functions to bypass hardcoded ID generation. CustomId should be the branded type for everything SQLite allows (string, number, binary).

PR welcomed.

@steida steida added enhancement New feature or request good first issue Good for newcomers labels Aug 10, 2024
@danilaplee
Copy link
Contributor

what is this for?

@steida
Copy link
Contributor Author

steida commented Aug 11, 2024

To allow people to use external IDs in Evolu tables.

https://discord.com/channels/1072319124337856613/1072319124337856616/1271869893662347378

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants