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

feat: ULID support #5092

Merged
merged 9 commits into from
Dec 19, 2024
Merged

feat: ULID support #5092

merged 9 commits into from
Dec 19, 2024

Conversation

jacek-prisma
Copy link
Contributor

@jacek-prisma jacek-prisma commented Dec 18, 2024

Uses the 26 character Crockford's base32 String representation.
Example ULIDs generated in tests:
01JFCSRJMJX6DWQ3T79T3W4HHK
01JFCSSM6ADDD95NPRAXP1YJBC
01JFCST0RA1RCJTNBTK4MTJ25J
01JFCST8GMP5G6BGX9PJJNQF67

Closes prisma/prisma#13679
Closes ORM-448

Copy link

codspeed-hq bot commented Dec 18, 2024

CodSpeed Performance Report

Merging #5092 will not alter performance

Comparing feat/ulid (586eb16) with main (acc7a89)

Summary

✅ 11 untouched benchmarks

Copy link
Contributor

github-actions bot commented Dec 18, 2024

WASM Query Engine file Size

Engine This PR Base branch Diff
Postgres 2.084MiB 2.083MiB 1.038KiB
Postgres (gzip) 837.744KiB 837.549KiB 199.000B
Mysql 2.049MiB 2.048MiB 1.152KiB
Mysql (gzip) 824.676KiB 823.607KiB 1.070KiB
Sqlite 1.962MiB 1.961MiB 1.161KiB
Sqlite (gzip) 788.683KiB 788.278KiB 415.000B

@jacek-prisma jacek-prisma marked this pull request as ready for review December 18, 2024 11:23
@jacek-prisma jacek-prisma requested a review from a team as a code owner December 18, 2024 11:23
@jacek-prisma jacek-prisma requested review from wmadden and removed request for a team December 18, 2024 11:23
.expect("Expected string ID but got something else.");

// Validate that this is a valid ULID value
assert!(ulid::Ulid::from_string(ulid).is_ok());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, add an explicit test to ensure we emit 26-char-long ULIDs, thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@jacek-prisma jacek-prisma removed the request for review from wmadden December 18, 2024 12:49
@jacek-prisma jacek-prisma added this to the 6.2.0 milestone Dec 18, 2024
@jacek-prisma jacek-prisma requested a review from jkomyno December 18, 2024 13:34
@jacek-prisma jacek-prisma merged commit 3aa9260 into main Dec 19, 2024
367 checks passed
@jacek-prisma jacek-prisma deleted the feat/ulid branch December 19, 2024 13:44
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

Successfully merging this pull request may close these issues.

Support ULID
3 participants