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

Boolean parsing #2

@FrancoRATOVOSON

Description

@FrancoRATOVOSON

Sorry to bother, 😅 discussion is not enabled.

First, read this issue #1

Following the principle that returned data will be first parsed by rust sqlx, tauri-plugin-sql (javascript side) and then drizzle, and the inability of sqlite to store real boolean, boolean values are just number, so are sent being number.

And when we follow the flow described in the first issue, we get:

tauri-plugin-sql (0 for false, 1 for true), which will be converted to simple { } by drizzle so we loose the boolean information.

My proposal:

Store booleans as string enum: 'true' or 'false', and when transforming object returned by tauri-plugin-sql to array (read the issue mentioned above), a parsing of string to boolean should also be done.

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