vector clock

This commit is contained in:
Brandon Thomas committed 2026-06-19 20:14:25 -04:00
1 parent 307c6ef320
commit 32fe697660
2 files changed
+11 -8

No files matched your search

@@ -26,9 +26,10 @@ where
pub phantom: PhantomData<&'c E>,
}
/// Update the mutable fields of an `uploaded_video_notes` record by `token`.
/// `updated_at` is refreshed via the column's `ON UPDATE` clause. Returns the
/// number of rows affected (0 if no row matched).
/// Update the mutable fields of an `uploaded_video_notes` record by `token`. The
/// `version` vector clock is incremented by 1, and `updated_at` is refreshed via
/// the column's `ON UPDATE` clause. Returns the number of rows affected (0 if no
/// row matched).
pub async fn update_uploaded_video_note<'e, 'c: 'e, E>(
args: UpdateUploadedVideoNoteArgs<'e, 'c, E>,
) -> Result<u64, sqlx::Error>
@@ -45,7 +46,8 @@ SET
maybe_website = ?,
maybe_other_website = ?,
maybe_comments = ?,
maybe_comment_update_ip_address = ?
maybe_comment_update_ip_address = ?,
version = version + 1
WHERE token = ?
LIMIT 1
"#,
@@ -28,9 +28,9 @@ where
}
/// Update the mutable fields of an `uploaded_videos` record by `token`
/// (dimensions, detection, report, updater IP). `updated_at` is refreshed via
/// the column's `ON UPDATE` clause. Returns the number of rows affected (0 if no
/// row matched).
/// (dimensions, detection, report, updater IP). The `version` vector clock is
/// incremented by 1, and `updated_at` is refreshed via the column's `ON UPDATE`
/// clause. Returns the number of rows affected (0 if no row matched).
pub async fn update_uploaded_video<'e, 'c: 'e, E>(
args: UpdateUploadedVideoArgs<'e, 'c, E>,
) -> Result<u64, sqlx::Error>
@@ -47,7 +47,8 @@ SET
maybe_detected_model_family = ?,
maybe_detected_model_type = ?,
maybe_report = ?,
maybe_updated_ip_address = ?
maybe_updated_ip_address = ?,
version = version + 1
WHERE token = ?
LIMIT 1
"#,