diff options
| author | Teddy Wing | 2022-03-13 13:57:48 +0100 | 
|---|---|---|
| committer | Teddy Wing | 2022-03-13 13:57:48 +0100 | 
| commit | e9fa29a7c7852caa27be2e5e0f3f7d45e2be5eed (patch) | |
| tree | 525b16b76533f12e43ab4b105c0fce4623f7b489 /src | |
| parent | 2eb81ea4bbed2c5a28044c41981671982fa0a369 (diff) | |
| download | yaqlite-e9fa29a7c7852caa27be2e5e0f3f7d45e2be5eed.tar.bz2 | |
main(): Idea for custom column selection
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.rs | 15 | 
1 files changed, 14 insertions, 1 deletions
| diff --git a/src/main.rs b/src/main.rs index c7bfc95..8dd9957 100644 --- a/src/main.rs +++ b/src/main.rs @@ -27,7 +27,12 @@ enum Command {          table_name: String, +        #[clap(long)] +        primary_key: Option<String>,          record_id: String, + +        #[clap(long)] +        exclude_column: Vec<String>,      },  } @@ -68,7 +73,15 @@ fn main() {          Command::Select {              database,              table_name, +            primary_key,              record_id, -        } => {}, +            exclude_column, +        } => { +            let dbconn = rusqlite::Connection::open(database).unwrap(); + +            yaqlite::select(&dbconn, &table_name, &record_id); + +            dbconn.close().unwrap(); +        },      };  } | 
