diff options
Diffstat (limited to 'rust/src/bin/show_creators.rs')
-rw-r--r-- | rust/src/bin/show_creators.rs | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/rust/src/bin/show_creators.rs b/rust/src/bin/show_creators.rs deleted file mode 100644 index 968d2542..00000000 --- a/rust/src/bin/show_creators.rs +++ /dev/null @@ -1,24 +0,0 @@ - -extern crate fatcat; -extern crate diesel; - -use self::fatcat::*; -use self::models::*; -use self::diesel::prelude::*; - -fn main() { - use diesel_demo::database_schema::creators::dsl::*; - - let connection = establish_connection(); - let results = creators.filter(published.eq(true)) - .limit(5) - .load::<CreatorRev>(&connection) - .expect("Error loading creators"); - - println!("Displaying {} creators", results.len()); - for creator in results { - println!("{}", creator.title); - println!("----------\n"); - println!("{}", creator.body); - } -} |