summaryrefslogtreecommitdiffstats
path: root/src/db/candidates.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/db/candidates.rs')
-rw-r--r--src/db/candidates.rs6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/db/candidates.rs b/src/db/candidates.rs
index 2aca851..4bfb0bf 100644
--- a/src/db/candidates.rs
+++ b/src/db/candidates.rs
@@ -66,8 +66,6 @@ impl OpenReview {
}
}
-// ------------------------------------------------------------------ in-tx --
-
#[derive(Debug, Clone)]
pub(crate) struct ReviewSubject {
pub id: i64,
@@ -242,8 +240,6 @@ pub fn insert_in(
Ok(tx.last_insert_rowid())
}
-// ------------------------------------------------------------------ reads --
-
pub fn all(db: &Db) -> Result<Vec<CandidateRow>> {
let sql = format!("SELECT {CANDIDATE_COLS} FROM candidate c JOIN pkgbase b ON b.id = c.pkgbase_id ORDER BY c.detected_at DESC LIMIT 500");
db.read(move |c| {
@@ -278,8 +274,6 @@ pub fn by_id(db: &Db, id: i64) -> Result<Option<CandidateRow>> {
db.read(move |c| Ok(c.query_row(&sql, params![id], row_to_candidate).optional()?))
}
-// ---------------------------------------------------------------- writes --
-
pub fn mark_viewed(db: &Db, id: i64) -> Result<()> {
let at = time::now();
db.writer.tx(move |tx| {