Skip to content

feat: Add Support for UUIDs - #640

Closed
fischerscode wants to merge 3 commits into
serverpod:mainfrom
fischerscode:fix-635
Closed

fischerscode wants to merge 3 commits into
serverpod:mainfrom
fischerscode:fix-635

Conversation

@fischerscode

@fischerscode fischerscode commented Feb 9, 2023 •

Copy link
Copy Markdown
Contributor

Adds support for UUIDs. They are represented as a String on the dart side, and as an uuid in the database.

Fix #635

I decided to introduce _uuid as a 'virtual' type.

This is an alternative implementation to #641.
Close #641

Pre-launch Checklist

  • I read the Contribute page and followed the process outlined there for submitting PRs.
  • This update contains only one single feature or bug fix and nothing else. (If you are submitting multiple fixes, please make multiple PRs.)
  • I read and followed the Dart Style Guide and formatted the code with dart format.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///), and made sure that the documentation follows the same style as other Serverpod documentation. I checked spelling and grammar.
  • I added new tests to check the change I am making.
  • All existing and new tests are passing.
  • Any breaking changes are documented below.

If you need help, consider asking for advice on the discussion board.

Breaking changes

none

(In theory, someone could have used _uuid as a type before, but since the name starts with an underscore, this is more then unlikely)

@vlidholt

Copy link
Copy Markdown
Collaborator

@fischerscode, perhaps it would be nicer to use the https://pub.dev/packages/uuid package to do this proper?

@fischerscode

Copy link
Copy Markdown
Contributor Author

So, you would use UuidValue instead of String?

The downside is that we would need an additional dependency.

@fischerscode fischerscode mentioned this pull request Feb 10, 2023
8 tasks done
@fischerscode

Copy link
Copy Markdown
Contributor Author

@fischerscode, perhaps it would be nicer to use the https://pub.dev/packages/uuid package to do this proper?

Implemented in #641 as an alternative to this PR.

@fischerscode

Copy link
Copy Markdown
Contributor Author

This PR now includes c2672e5. I'm not sure, why the change occurred while regenerating...

@vlidholt

Copy link
Copy Markdown
Collaborator

I'm closing this one. The one with Uuid objects feels more correct to me.

@vlidholt vlidholt closed this Feb 10, 2023
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for UUID

2 participants