Inventur/inventur_db/src/bin/move_entry.rs~
Johannes Randerath c06ddc9498 First release
2024-08-27 18:25:04 +02:00

26 lines
578 B
Rust

use inventur_db::*;
use std::env::args;
fn main() {
let tblid = args()
.nth(1)
.expect("Usage: move_entry <tblid> <rowpos> <newpos>.")
.parse::<i32>()
.expect("Expected a number.");
let rowpos = args()
.nth(2)
.expect("Usage: move_entry <tblid> <rowpos> <newpos>.")
.parse::<i32>()
.expect("Expected a number.");
let newpos = args()
.nth(3)
.expect("Usage: move_entry <tblid> <rowpos> <newpos>.")
.parse::<i32>()
.expect("Expected a number.");
println!("{:?}", jrentries::move_jrentry(&mut establish_connection(), tblid, rowpos, newpos));
}