Skip to content
This repository was archived by the owner on Mar 21, 2025. It is now read-only.
This repository was archived by the owner on Mar 21, 2025. It is now read-only.

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

@ryusei-48

Description

@ryusei-48

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions