Dmitri Pisarev
07/15/2020, 3:06 PMnikolasburk
OR should be available inside of findMany as documented here.
const result = await prisma.post.findMany({
where: {
OR: [
{
title: { contains: 'Prisma' },
},
{
title: { contains: 'databases' },
},
],
},
})nikolasburk
Dmitri Pisarev
07/15/2020, 3:14 PMnikolasburk
Dmitri Pisarev
07/15/2020, 3:17 PMnikolasburk
Dmitri Pisarev
07/15/2020, 3:24 PMDmitri Pisarev
07/15/2020, 3:24 PMtype Thing @db(name: "myMongoCollection") {
_id: ID! @id
}Dmitri Pisarev
07/15/2020, 3:24 PMexport interface ThingWhereInput {
_id?: string | null
_id_not?: string | null
_id_in?: string[]
_id_not_in?: string[]
_id_lt?: string | null
_id_lte?: string | null
_id_gt?: string | null
_id_gte?: string | null
_id_contains?: string | null
_id_not_contains?: string | null
_id_starts_with?: string | null
_id_not_starts_with?: string | null
_id_ends_with?: string | null
_id_not_ends_with?: string | null
AND?: ThingWhereInput[]
}Dmitri Pisarev
07/15/2020, 3:25 PMDmitri Pisarev
07/15/2020, 3:26 PMexport interface RoleScalarWhereInput {
_id?: string | null
_id_not?: string | null
_id_in?: string[]
_id_not_in?: string[]
_id_lt?: string | null
_id_lte?: string | null
_id_gt?: string | null
_id_gte?: string | null
_id_contains?: string | null
_id_not_contains?: string | null
_id_starts_with?: string | null
_id_not_starts_with?: string | null
_id_ends_with?: string | null
_id_not_ends_with?: string | null
name?: string | null
name_not?: string | null
name_in?: string[]
name_not_in?: string[]
name_lt?: string | null
name_lte?: string | null
name_gt?: string | null
name_gte?: string | null
name_contains?: string | null
name_not_contains?: string | null
name_starts_with?: string | null
name_not_starts_with?: string | null
name_ends_with?: string | null
name_not_ends_with?: string | null
AND?: RoleScalarWhereInput[]
OR?: RoleScalarWhereInput[]
NOT?: RoleScalarWhereInput[]
}Dmitri Pisarev
07/15/2020, 3:43 PMDmitri Pisarev
07/15/2020, 4:06 PM