Simon Sardorf
06/26/2022, 5:52 PMP2002
? Currently experiencing this
EDIT: Just read up on it, and it’s a postgres “feature”Thomas Yankue
06/26/2022, 6:50 PMmodel Thanks {
target: string
reason: string
}
with target being a user's name. I'm wondering how I can find the top 10 users that have the most thanks? Thank you.Steven Stavrakis
06/26/2022, 7:13 PMType 'string | string[]' is not assignable to type 'string | StringFieldUpdateOperationsInput | undefined'.
Type 'string[]' is not assignable to type 'string | StringFieldUpdateOperationsInput | undefined'.ts(2322)
Is about? I'm not sure why the type is being defined with string[]woolite
06/26/2022, 9:15 PMPrisma.XXXCreateInput
.
Currently compiler throws this errorShadowPrompt
06/26/2022, 11:08 PMSteven Inouye
06/27/2022, 5:43 AMHussam Khatib
06/27/2022, 2:45 PMenum Gender{
M
F
Other
}
I want this in the client as
const genders = ["M","F","Other"]
without hardcoding.AJ Holloway
06/27/2022, 7:27 PMPinkiePie
06/27/2022, 9:02 PMChris Tsongas
06/28/2022, 12:10 AMnotEquals
? notIn
is so convenient.Vin Yap
06/28/2022, 6:17 AMBjörnstjerne Tiedemann
06/28/2022, 6:51 AMTakeo Kusama
06/28/2022, 9:58 AMKay Khan
06/28/2022, 11:37 AMconst options: Prisma.brandFindManyArgs = {
distinct: ["name"],
select: {
id: true,
name: true,
website: true,
company_size_li: true,
image: {
select: {
id: true,
source: true,
dtype: true,
},
},
},
//take: 10068,
};
SELECT DISTINCT b.name, b.id, b.website, b.company_size_li, i.id, i.source, i.dtype
FROM brand b
JOIN image i ON i.id = b.image_id
SELECT count(DISTINCT b.id) // 10068
FROM brand b
JOIN image i ON i.id = b.image_id
McKay Bonham
06/28/2022, 11:55 AMgenerator client {
provider = "prisma-client-js"
}
datasource db {
provider = "mongodb"
url = env("DATABASE_URL")
}
model User {
id String @id @default(auto()) @map("_id") @db.ObjectId
email String @unique(map: "email_1")
name String @unique
passHash String
privilege Int
createdAt DateTime
lastLogin DateTime?
campaigns Campaign[]
passcodes String[]
disabledCmp String[]
}
model Campaign {
id String @id @default(auto()) @map("_id") @db.ObjectId
name String @unique
creator User @relation(fields: [creatorId], references: [id])
creatorId String @db.ObjectId
fullPasscode String
pcPasscode String
description String?
createdAt DateTime
}
Rajdeep singh
06/28/2022, 1:16 PMRajdeep singh
06/28/2022, 1:17 PMRajdeep singh
06/28/2022, 1:18 PMnpx prisma db push
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Error: Get config: Unable to establish a connection to query-engine-node-api library
Prisma CLI Version : 3.15.2
Rajdeep singh
06/28/2022, 1:21 PMShmuel
06/28/2022, 1:27 PMorderBy
of prisma client? If not what are some ideas for workarounds?
(I see this issue in the archived prisma repo https://github.com/prisma/specs/issues/128, but it was closed as completed, though I don't see docs for allowing case statements in the orderBy
clause.
This issue https://github.com/prisma/prisma/issues/10335 is in the current repo, but it's not so clear from the title that the feature request is for case statements. Maybe the title should be renamed to 'Support case statements in orderBy' like the first issue?)Pieter
06/28/2022, 2:56 PMDmitrii Kartashev
06/28/2022, 3:23 PMDbNull
thing exactly the use case for Symbols? Why objects?Jose Maria CL
06/28/2022, 3:46 PMMichael Gates
06/28/2022, 3:54 PMNditah Samweld
06/28/2022, 4:05 PMcuid
generate by prisma as PrimaryKey
model Picture {
id String @id @default(cuid())
page String
...
@@map(name: "picture")
}
import { InputType, Field, PartialType } from '@nestjs/graphql';
import { IsNotEmpty, IsString, IsUUID } from 'class-validator';
@InputType()
export class UpdatePictureInput {
@IsString()
@Field(() => String, { description: 'PrimaryKey' })
id: string;
}
luwol03
06/28/2022, 5:34 PMTanul
06/28/2022, 6:08 PMFranco Roura
06/28/2022, 6:23 PMprisma.model.findFirst({
where: {
something,
},
orderBy: {
updatedAt: 'desc',
},
})
Will it sort before or after the limit clause?
I mean, will it bring me the last updated record? Or just the first thing it finds?James Johnson III
06/28/2022, 6:31 PM