22
src/bin/get-harms.rs
Normal file
22
src/bin/get-harms.rs
Normal file
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* advotracker - Hotline tackingtool for Advocats
|
||||
*
|
||||
* Copyright 2020 Ralf Zerres <ralf.zerres@networkx.de>
|
||||
* SPDX-License-Identifier: (0BSD or MIT)
|
||||
*/
|
||||
|
||||
fn main() {
|
||||
use advotracker_db::functions::db_connection::establish_connection;
|
||||
use advotracker_db::models::harms::Harm;
|
||||
|
||||
let connection = establish_connection();
|
||||
|
||||
// function call
|
||||
let vec_rows = Harm::get_all(&connection);
|
||||
let rows = vec_rows.iter();
|
||||
println!("Matching harms (count: {})", rows.len());
|
||||
for row in rows {
|
||||
println!("{:?}: {:?} {:?} {:?} {:?}",
|
||||
row.id, row.id_harm, row.id_policyholder, row.id_callback, row.date_recording);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user