Codex worktree snapshot: settings-delete-targeted
Co-authored-by: Codex
This commit is contained in:
@@ -128,12 +128,12 @@ pub(crate) fn upsert_asset_object(
|
||||
)
|
||||
.map_err(|error| error.to_string())?;
|
||||
|
||||
// 这里先保持最小可发布实现:查重语义已经冻结,后续再把实现优化回组合索引扫描。
|
||||
let current = ctx
|
||||
.db
|
||||
.asset_object()
|
||||
.iter()
|
||||
.find(|row| row.bucket == input.bucket && row.object_key == input.object_key);
|
||||
.by_bucket_object_key()
|
||||
.filter((input.bucket.as_str(), input.object_key.as_str()))
|
||||
.next();
|
||||
|
||||
let snapshot = match current {
|
||||
Some(existing) => {
|
||||
@@ -196,8 +196,9 @@ pub(crate) fn upsert_asset_object(
|
||||
pub(crate) fn has_asset_object(ctx: &ReducerContext, asset_object_id: &str) -> bool {
|
||||
ctx.db
|
||||
.asset_object()
|
||||
.iter()
|
||||
.any(|row| row.asset_object_id == asset_object_id)
|
||||
.asset_object_id()
|
||||
.find(&asset_object_id.to_string())
|
||||
.is_some()
|
||||
}
|
||||
|
||||
fn list_asset_history(
|
||||
@@ -224,8 +225,8 @@ fn list_asset_history(
|
||||
let mut entries = ctx
|
||||
.db
|
||||
.asset_object()
|
||||
.iter()
|
||||
.filter(|row| row.asset_kind == asset_kind)
|
||||
.asset_kind()
|
||||
.filter(&asset_kind.to_string())
|
||||
.map(|row| AssetHistoryEntrySnapshot {
|
||||
asset_object_id: row.asset_object_id,
|
||||
asset_kind: row.asset_kind,
|
||||
|
||||
Reference in New Issue
Block a user