aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index 0ec2724..b770fa9 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,10 +1,30 @@
+use clap::Parser;
use rusqlite;
use yaml_rust::yaml;
+#[derive(clap::Parser, Debug)]
+#[clap()]
+struct Args {
+ #[clap(subcommand)]
+ command: Command,
+
+ #[clap(long)]
+ database: String,
+}
+
+#[derive(clap::Subcommand, Debug)]
+enum Command {
+ Insert,
+ Select,
+}
+
+
fn main() {
println!("Hello, world!");
+ let args = Args::parse();
+
// Get column names from SQLite
let mut dbconn = rusqlite::Connection::open("./test.db").unwrap();