-
Notifications
You must be signed in to change notification settings - Fork 240
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(psl, query-engine, schema-engine): add cuid(2)
support, fix uuid(7)
#5047
Merged
+890
−144
Merged
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
454112f
feat(psl): add cuid(2) support, fix uuid(7) re-introspection
jkomyno 8b6ac6e
chore(psl): fix clippy
jkomyno 195d25d
chore(psl): fix clippy
jkomyno 04af8ad
fix(dmmf): [breaking] serialise uuid and cuid with proper args
jkomyno e902e3a
test(dmmf): expand functions.json test suite
jkomyno df254e9
chore(query-structure): interpret "cuid()" as "cuid(1)"
jkomyno 547c979
chore: remove leftover
jkomyno 8e91dfb
Merge branch 'main' into feat/cuid2-support
jkomyno a154696
fix(query-engine): fix "create_uuid_v7_and_retrieve_it_should_work" s…
jkomyno 56a6ca6
test(query-engine): add create_cuid_v2_and_retrieve_it_should_work test
jkomyno 16e3d1d
feat(query-engine): port cuid to workspace, replace Prisma's wasm32-o…
jkomyno 71c4aeb
feat(query-engine): replace cuid1 with cuid2 for internal transaction…
jkomyno 9d191ed
Merge branch 'feat/cuid2-support' of github.com:prisma/prisma-engines…
jkomyno 148551c
chore: cargo fmt
jkomyno c1159eb
chore: clippy
jkomyno 9d04afb
fix(psl): keep cuid() default version as 1
jkomyno da162ec
test(query-engine): add "create_cuid_v1_and_retrieve_it_should_work" …
jkomyno 0af3191
chore: address review comments
jkomyno 7e6a66e
test(psl): add validation tests for cuid and uuid
jkomyno 5102928
fix(dmmf): serialise uuid, cuid like nanoid; parse nanoid like uuid, …
jkomyno e0e5158
chore(psl): revert bad test update to "server_side_functions"
jkomyno 4410268
chore(dmmf): remove unused tuple, simplify "default_value" for genera…
jkomyno e232e8a
fix(psl): typo in test
jkomyno fe03f7e
fix(psl): typo in test
jkomyno f9f2ef1
chore(psl): use itertools
jkomyno 270e457
fix(qe): fix broken shebang in query-engine-wasm/build.sh
aqrln 9b43712
Merge branch 'main' into feat/cuid2-support
jkomyno d9386d2
Merge branch 'main' into feat/cuid2-support
jkomyno 1e91366
chore(driver-adapters):: bump wrangler version to 3.88.0
jkomyno f767af2
chore(driver-adapters): bump wasm32-unknown-unknown rust-toolchain to…
jkomyno c538098
Merge branch 'feat/cuid2-support' of github.com:prisma/prisma-engines…
jkomyno 520fb09
fix(query-engine-wasm): replace "cuid" with "prisma/cuid-rust?branch=…
jkomyno 5e70c06
Merge branch 'feat/cuid2-support' of github.com:prisma/prisma-engines…
jkomyno c57a8e2
chore: revert upgrade to wrangler (from 3.50.0 to 3.88.0) for suspect…
jkomyno bd42901
chore: remove leftover
jkomyno File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,6 +54,9 @@ chrono = { version = "0.4.38", features = ["serde"] } | |
derive_more = "0.99.17" | ||
user-facing-errors = { path = "./libs/user-facing-errors" } | ||
uuid = { version = "1", features = ["serde", "v4", "v7", "js"] } | ||
cuid = { git = "https://github.com/prisma/cuid-rust", branch = "v1.3.3-wasm32-unknown-unknown" } | ||
getrandom = { version = "0.2" } | ||
|
||
indoc = "2.0.1" | ||
indexmap = { version = "2.2.2", features = ["serde"] } | ||
itertools = "0.12" | ||
|
@@ -64,7 +67,6 @@ napi = { version = "2.16.13", default-features = false, features = [ | |
"serde-json", | ||
] } | ||
napi-derive = "2.16.12" | ||
js-sys = { version = "0.3" } | ||
pin-project = "1" | ||
rand = { version = "0.8" } | ||
regex = { version = "1", features = ["std"] } | ||
|
@@ -73,6 +75,11 @@ serde-wasm-bindgen = { version = "0.5" } | |
tracing = { version = "0.1" } | ||
tracing-futures = "0.2" | ||
tsify = { version = "0.4.5" } | ||
|
||
# version for `[email protected]`, see: | ||
# https://github.com/rustwasm/wasm-bindgen/pull/4072/ | ||
js-sys = { version = "0.3.70" } | ||
|
||
wasm-bindgen = { version = "0.2.93" } | ||
wasm-bindgen-futures = { version = "0.4" } | ||
wasm-rs-dbg = { version = "0.1.2", default-features = false, features = ["console-error"] } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
//! Convenient access to a ID generator constants, used by Prisma in psl, Query Engine and Schema Engine. | ||
//! Every change to the `DEFAULT_*_VERSION` constants in this module is a breaking change. | ||
|
||
/// Version of the `uuid()` ID generator supported by Prisma. | ||
pub const UUID_SUPPORTED_VERSIONS: [u8; 2] = [4, 7]; | ||
|
||
/// Version of the `cuid()` ID generator supported by Prisma. | ||
pub const CUID_SUPPORTED_VERSIONS: [u8; 2] = [1, 2]; | ||
|
||
/// Default version of the `uuid()` ID generator. | ||
pub const DEFAULT_UUID_VERSION: u8 = 4; | ||
|
||
/// Default version of the `cuid()` ID generator. | ||
// Note: if you change this, you'll likely need to adapt existing tests that rely on `cuid()` sequences being already sorted | ||
// (e.g., `cuid(1)`, the current default, generates monotonically increasing sequences, `cuid(2)` doesn't). | ||
pub const DEFAULT_CUID_VERSION: u8 = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually I don't see it committed in this PR, is also covered by a
.gitignore
in some subdirectory?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, let's fix this in a follow-up PR