prisma-client-go icon indicating copy to clipboard operation
prisma-client-go copied to clipboard

No Exported Interface/Struct for UpsertOne or CreateOne return value

Open FaBeyyy opened this issue 2 years ago • 2 comments

Given following Example with table name Foo:

func upsertFoo() 'struct or interface needed' {
    return prismaClient.Foo.UpsertOne(...)
}

Is there an exported interface or struct that can be used as a return type for the following example? Should db.fooUpsertOne be an exported struct so it can be used as a type?

FaBeyyy avatar Sep 19 '23 00:09 FaBeyyy

Fair enough, I'm wondering what's the use case for this? Why are you not doing .Exec(ctx) in that function?

steebchen avatar Sep 19 '23 01:09 steebchen

I want to leave it open to the caller if Exec Tx etc... is called. If i find some time this week i'll open a PR.

FaBeyyy avatar Sep 19 '23 11:09 FaBeyyy