MCPcopy Create free account
hub / github.com/erans/pgsqlite / encode_row_description

Function encode_row_description

src/protocol/codec.rs:246–264  ·  view source on GitHub ↗
(fields: Vec<FieldDescription>, dst: &mut BytesMut)

Source from the content-addressed store, hash-verified

244}
245
246fn encode_row_description(fields: Vec<FieldDescription>, dst: &mut BytesMut) {
247 dst.put_u8(b'T');
248 let len_pos = dst.len();
249 dst.put_i32(0); // Placeholder
250
251 dst.put_i16(fields.len() as i16);
252
253 for field in fields {
254 put_cstring(dst, &field.name);
255 dst.put_i32(field.table_oid);
256 dst.put_i16(field.column_id);
257 dst.put_i32(field.type_oid);
258 dst.put_i16(field.type_size);
259 dst.put_i32(field.type_modifier);
260 dst.put_i16(field.format);
261 }
262
263 update_message_length(dst, len_pos);
264}
265
266fn encode_data_row(values: &[Option<Vec<u8>>], dst: &mut BytesMut) {
267 // Debug logging for array fields

Callers 1

encodeMethod · 0.85

Calls 3

put_cstringFunction · 0.85
update_message_lengthFunction · 0.85
lenMethod · 0.45

Tested by

no test coverage detected