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

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

Open
ryusei-48 opened this issue Jun 9, 2024 · 0 comments
Open

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

ryusei-48 opened this issue Jun 9, 2024 · 0 comments

Comments

@ryusei-48
Copy link

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

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

No branches or pull requests

1 participant