We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
This should work:
#[tokio::test] async fn tuples() -> anyhow::Result<()> { let client = Client::new(&SERVER.config); client.ensure_connected().await?; let res: Value = client .query_required_single("select <tuple<int64, int64>>(42, 3)", &()) .await .unwrap(); let Value::Tuple(res) = res else { panic!() }; assert_eq!(res, vec![Value::Int64(42), Value::Int64(3)]); let res: (i64, i64) = client .query_required_single("select <tuple<int64, int64>>(42, 3)", &()) .await .unwrap(); assert_eq!(res, (42, 3)); let arg = Value::Tuple(vec![Value::Int64(42), Value::Int64(3)]); let res: (i64, i64) = client .query_required_single("select <tuple<int64, int64>>$0", &(arg,)) .await .unwrap(); assert_eq!(res, (42, 3)); let arg: (i64, i64) = (42, 3); let res: (i64, i64) = client .query_required_single("select <tuple<int64, int64>>$0", &(arg,)) .await .unwrap(); assert_eq!(res, (42, 3)); Ok(()) }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This should work:
The text was updated successfully, but these errors were encountered: