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

A bug is occurring in the query to get only empty data "NULL".

Open ryusei-48 opened this issue 1 year ago • 0 comments

I am using TAURI to develop my application. Suppose you have a table with the following schema

model Clipboard {
  id              Int             @id @default(autoincrement())
  app_title       String
  process_id      Int
  text            String?
  rtf             String?
  html            String?
  image           Bytes?
  files           String?
  is_hold         Boolean         @default(false)
  update_at       DateTime        @updatedAt
  register_at     DateTime        @default(now())
}

So, for example, the following is a query to retrieve only the "image" columns for which data exists.

let result = state.storage.clipboard().find_many
    vec![ clipboard::image::not( None ) ]
).exec().await.unwrap();

This code actually works, but the odd thing is that if all the "image" columns are "NULL", then normally no records are returned, but for some reason all records are retrieved.

If there is at least one record with data in the "image" column, the aforementioned problem will not occur.

Is this a bug?

environment

rust version: 1.78 tauri = 1.6.7 prisma-client-rust = 0.6.11

ryusei-48 avatar Jun 09 '24 21:06 ryusei-48