(values: &[Option<Vec<u8>>], dst: &mut BytesMut)
| 264 | } |
| 265 | |
| 266 | fn encode_data_row(values: &[Option<Vec<u8>>], dst: &mut BytesMut) { |
| 267 | // Debug logging for array fields |
| 268 | if values.len() == 1 |
| 269 | && let Some(Some(data)) = values.first() |
| 270 | && data.len() == 41 { |
| 271 | println!("DEBUG: encode_data_row sending 41-byte field (likely array with nulls)"); |
| 272 | println!(" Data length being written: {}", data.len()); |
| 273 | } |
| 274 | |
| 275 | dst.put_u8(b'D'); |
| 276 | let len_pos = dst.len(); |
| 277 | dst.put_i32(0); // Placeholder |
| 278 | |
| 279 | dst.put_i16(values.len() as i16); |
| 280 | |
| 281 | for value in values { |
| 282 | match value { |
| 283 | None => dst.put_i32(-1), |
| 284 | Some(data) => { |
| 285 | dst.put_i32(data.len() as i32); |
| 286 | dst.put_slice(data); |
| 287 | } |
| 288 | } |
| 289 | } |
| 290 | |
| 291 | update_message_length(dst, len_pos); |
| 292 | } |
| 293 | |
| 294 | fn encode_command_complete(tag: &str, dst: &mut BytesMut) { |
| 295 | dst.put_u8(b'C'); |
no test coverage detected