Add call to load_sql
This commit is contained in:
parent
4349e35060
commit
9c1711e8fa
2 changed files with 5 additions and 2 deletions
|
@ -55,8 +55,6 @@ fn establish_connection() -> Result<PgConnection, CacheError> {
|
|||
fn load_sql() {
|
||||
let connection = &mut establish_connection().unwrap();
|
||||
let results = cache
|
||||
.filter(true)
|
||||
.limit(5)
|
||||
.load::<Cache>(connection)
|
||||
.expect("Error loading cache");
|
||||
|
||||
|
@ -67,3 +65,7 @@ fn load_sql() {
|
|||
println!("---");
|
||||
};
|
||||
}
|
||||
|
||||
pub fn sql_cache() {
|
||||
load_sql();
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@ use mouth::Mouth;
|
|||
|
||||
/// Entry point of the library, propagates errors to `main`.
|
||||
pub fn run() -> Result<(), Box<dyn Error>> {
|
||||
cache::sql_cache();
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue