Skip to content

Erroneous behaviour when selecting multiple booleans  #112

@thomask

Description

@thomask

I've just cloned the repo and added the following (failing) test case:

#[tokio::test]
async fn multiple_booleans() {
    let client = prepare_database!();

    #[derive(Row, Deserialize)]
    struct Row {
        a: bool,
        b: bool,
    }

    let row = client
        .query("WITH
            (
                select true
            ) as a,
            (
                select true
            ) as b
            SELECT
                ?fields"
        )
        .fetch_one::<Row>()
        .await
        .unwrap();


    assert_eq!(row.a, true);
    assert_eq!(row.b, true);
}

One bool is false, the other is true.

I haven't had time yet to dig into the library code to diagnose the issue. Perhaps this is an easy fix for the author. If not, I'd be more than happy to look in to this next week.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions