aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorTeddy Wing2022-03-13 13:57:48 +0100
committerTeddy Wing2022-03-13 13:57:48 +0100
commite9fa29a7c7852caa27be2e5e0f3f7d45e2be5eed (patch)
tree525b16b76533f12e43ab4b105c0fce4623f7b489 /src/main.rs
parent2eb81ea4bbed2c5a28044c41981671982fa0a369 (diff)
downloadyaqlite-e9fa29a7c7852caa27be2e5e0f3f7d45e2be5eed.tar.bz2
main(): Idea for custom column selection
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs15
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();
+ },
};
}