-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR adds support for UUIDs to the DAL. Summary of changes: - The generation script (`yarn client:generate`) was slightly modified to add a `/// @zod.string.uuid()` comment to the introspected Prisma schema. This comment instructs the Zod generator to extend the Zod schema with a uuid validator. - The generator is changed to expose the UUID type in the generated Electric client - An e2e test was added to test that UUIDs can sync to and from Electric and that writes with invalid UUIDs are rejected by Zod.
- Loading branch information
Showing
21 changed files
with
1,476 additions
and
21 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"electric-sql": patch | ||
"@electric-sql/prisma-generator": patch | ||
--- | ||
|
||
Adds client-side support for int2 and int4 types. |
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,6 @@ | ||
--- | ||
"electric-sql": patch | ||
"@electric-sql/prisma-generator": patch | ||
--- | ||
|
||
Add client-side validations for UUIDs. |
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
Oops, something went wrong.