We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
NotExists()
I am using Prisma with MongoDB as the datasource and Go as the generator. Below is my setup:
datasource db { provider = "mongodb" url = env("MONGO_URI") } generator db { provider = "go run github.com/steebchen/prisma-client-go" } model Company { id String @id @default(auto()) @map("_id") @db.ObjectId name String address String created_at DateTime @default(now()) updated_at DateTime @updatedAt deleted_at DateTime? }
Currently, the following query works only when the deleted_at column is present and is null in MongoDB:
var params []db.CustomerWhereParam params = append(params, db.Customer.DeletedAt.IsNull())
However, I need support for a query where the deleted_at column does not exist in MongoDB, like this raw query:
{ "deleted_at": { "$exists": false } }
Proposed solution:
params = append(params, db.Customer.DeletedAt.NotExists())
The text was updated successfully, but these errors were encountered:
Yeah this is currently missing, I will look into this.
internal note: The field should be isset like in the JS client.
isset
Sorry, something went wrong.
No branches or pull requests
I am using Prisma with MongoDB as the datasource and Go as the generator. Below is my setup:
Currently, the following query works only when the deleted_at column is present and is null in MongoDB:
However, I need support for a query where the deleted_at column does not exist in MongoDB, like this raw query:
Proposed solution:
The text was updated successfully, but these errors were encountered: