diff options
| author | Teddy Wing | 2022-03-19 15:21:50 +0100 | 
|---|---|---|
| committer | Teddy Wing | 2022-03-19 15:21:50 +0100 | 
| commit | 442539ccf844e92ce432c5920fc7c254997a6acb (patch) | |
| tree | 6bae67e8c17e9b8689bea1b819ceebb4bcda261f /src | |
| parent | 54cbd8ca5f7d00f3866724bbe92ae9a6ce6e1e57 (diff) | |
| download | yaqlite-442539ccf844e92ce432c5920fc7c254997a6acb.tar.bz2 | |
select(): Parameterize primary key column name
Diffstat (limited to 'src')
| -rw-r--r-- | src/select.rs | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/src/select.rs b/src/select.rs index 71a096e..86898bb 100644 --- a/src/select.rs +++ b/src/select.rs @@ -39,7 +39,7 @@ pub fn select_by_column(                  WHERE "{}" = :pk;              "#,              table_name, -            "id", +            primary_key_column,          ),      )?; @@ -72,7 +72,7 @@ pub fn select_by_column(              let mut data = yaml_rust::yaml::Hash::new();              for (i, column) in column_names.iter().enumerate() { -                if column == "id" { +                if column == primary_key_column {                      continue                  } | 
