diff options
| author | Teddy Wing | 2022-03-19 04:15:43 +0100 | 
|---|---|---|
| committer | Teddy Wing | 2022-03-19 04:15:43 +0100 | 
| commit | c00534e648da45b8e925c777c96200d55a82d01d (patch) | |
| tree | f65af57b94a2e77ded9785cbd5039423ed3e1e4f /src | |
| parent | a28ddc0da43ef01774c1816a2be5786ae0c52953 (diff) | |
| download | yaqlite-c00534e648da45b8e925c777c96200d55a82d01d.tar.bz2 | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/select.rs | 4 | 
1 files changed, 4 insertions, 0 deletions
| 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)?; | 
