Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Exported Interface/Struct for UpsertOne or CreateOne return value #1002

Open
FaBeyyy opened this issue Sep 19, 2023 · 2 comments
Open

No Exported Interface/Struct for UpsertOne or CreateOne return value #1002

FaBeyyy opened this issue Sep 19, 2023 · 2 comments

Comments

@FaBeyyy
Copy link

FaBeyyy commented Sep 19, 2023

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?

@steebchen
Copy link
Owner

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

@FaBeyyy
Copy link
Author

FaBeyyy commented Sep 19, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants