-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes issues where the types were not compatible with the corresponding types from the Prisma client. Also adds additional options for bytes types. BufferObject matches the default JSON.stringify output for a Buffer object.
- Loading branch information
Showing
30 changed files
with
507 additions
and
240 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
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,45 @@ | ||
// We need to use mongo to test composite types | ||
datasource db { | ||
provider = "mongodb" | ||
url = "" | ||
} | ||
|
||
enum Gender { | ||
Male | ||
Female | ||
Other | ||
} | ||
|
||
enum PhotoType { | ||
Selfie | ||
Profile | ||
Tagged | ||
} | ||
|
||
model Person { | ||
id Int @id @map("_id") | ||
name String | ||
gender Gender | ||
addressId Int | ||
address Address @relation(fields: [addressId], references: [id]) | ||
photos Photo[] | ||
tags Tag? | ||
} | ||
|
||
model Address { | ||
id Int @id @map("_id") | ||
addresText String | ||
people Person[] | ||
} | ||
|
||
type Photo { | ||
height Int | ||
Width Int | ||
url String | ||
type PhotoType | ||
} | ||
|
||
type Tag { | ||
id Int | ||
name String | ||
} |
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.