prisma / quaint

SQL Query AST and Visitor for Rust
Apache License 2.0
582 stars 61 forks source link

PostgreSQL - Error when "column" is a type 'void' #414

Open carlos-rian opened 1 year ago

carlos-rian commented 1 year ago

Hey guys,

I try to use quaint in a simple benchmark where the database has a lag/delay in response. So I'm using pg_sleep to simulate this delay.

But with this command returning a void, Quaint has an error.

In that case, would it be better to deserialize to null?

DB: PostgreSQL Rust: 1.64.0 Quaint: https://github.com/prisma/quaint

Example:

// query
let sql = "SELECT pg_sleep(0.1);";

// quaint connection
let conn = Quaint::new("postgresql://postgres:postgrespw@localhost:49153").await.unwrap();

// run query
let result = conn.query_raw(sql, &[]).await.unwrap();

Error: Column type 'void' could not be deserialized from the database.