mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-01 07:58:23 +00:00
vector clock
This commit is contained in:
1 parent
307c6ef320
commit
32fe697660
2 files changed
+11
-8
No files matched your search
+6
-4
@@ -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
|
||||
"#,
|
||||
|
||||
+5
-4
@@ -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
|
||||
"#,
|
||||
|
||||
Reference in new issue
Block a user