Skip to content

feat: ULID support#5092

Merged
jacek-prisma merged 9 commits intomainfrom
feat/ulid
Dec 19, 2024
Merged

feat: ULID support#5092
jacek-prisma merged 9 commits intomainfrom
feat/ulid

Conversation

@jacek-prisma
Copy link
Copy Markdown
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

@codspeed-hq
Copy link
Copy Markdown

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

@github-actions
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
@aleclarson
Copy link
Copy Markdown

aleclarson commented Apr 23, 2025

Was this later reverted? I see no mention of this in the official docs. (edit: Nvm, found it in the docs).

Also, does this store the ULID in binary format?

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

4 participants