| 177 | use spacetimedb_lib::{ConnectionId, Identity}; |
| 178 | |
| 179 | async fn run(schema: ProductType, row: ProductValue) -> String { |
| 180 | let header = row_desc(&schema, &Format::UnifiedText); |
| 181 | |
| 182 | let stmt = SqlStmtResult { |
| 183 | schema, |
| 184 | rows: vec![row], |
| 185 | total_duration_micros: 0, |
| 186 | stats: Default::default(), |
| 187 | }; |
| 188 | let mut stream = to_rows(stmt, header).unwrap(); |
| 189 | let mut result = String::new(); |
| 190 | if let Some(row) = stream.next().await { |
| 191 | result = String::from_utf8_lossy(row.unwrap().data.freeze().as_ref()).to_string(); |
| 192 | } |
| 193 | result |
| 194 | } |
| 195 | |
| 196 | #[tokio::test] |
| 197 | async fn test_primitives() { |