From c00534e648da45b8e925c777c96200d55a82d01d Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 19 Mar 2022 04:15:43 +0100 Subject: select(): Don't include the primary key in the `Yaml` hash The primary key shouldn't be editable, so don't include it in the resulting YAML. --- src/select.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/select.rs b/src/select.rs index d3dc9f0..d5bab23 100644 --- a/src/select.rs +++ b/src/select.rs @@ -50,6 +50,10 @@ pub fn select( let mut data = yaml_rust::yaml::Hash::new(); for (i, column) in column_names.iter().enumerate() { + if column == "id" { + continue + } + let column_name = column.to_owned(); let column_value: Yaml = row.get(i)?; -- cgit v1.2.3