Skip to content

Instantly share code, notes, and snippets.

@rippinrobr
Last active May 24, 2018 22:18
Show Gist options
  • Save rippinrobr/0937015d47598082ba54d5f04c8af7b3 to your computer and use it in GitHub Desktop.
Save rippinrobr/0937015d47598082ba54d5f04c8af7b3 to your computer and use it in GitHub Desktop.
Updates the link record to indicate that it has been processed
pub fn mark_link_as_processed(conn: &SqliteConnection, link_title: &str) ->Result<usize, diesel::result::Error> {
let u_stmt = format!("UPDATE links_processed SET processed=1 WHERE title='{}';", link_title.replace("'", "''"));
let update = sql::<Bool>(&u_stmt);
update.execute(conn)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment