summaryrefslogtreecommitdiff
path: root/ext/kv/lib.rs
diff options
context:
space:
mode:
authorHeyang Zhou <zhy20000919@hotmail.com>2023-08-18 17:34:16 +0800
committerGitHub <noreply@github.com>2023-08-18 17:34:16 +0800
commitc77c836a238ce683b21c12f88cd1101b930ce042 (patch)
treeb69b2318f618d1b384dc168ab6652496d63e2f2c /ext/kv/lib.rs
parentb5839eefcf02e62e9e77e8095f372ac06a523cba (diff)
feat(ext/kv): key expiration (#20091)
Co-authored-by: Luca Casonato <hello@lcas.dev>
Diffstat (limited to 'ext/kv/lib.rs')
-rw-r--r--ext/kv/lib.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/kv/lib.rs b/ext/kv/lib.rs
index a781f4579..7164a700b 100644
--- a/ext/kv/lib.rs
+++ b/ext/kv/lib.rs
@@ -375,7 +375,7 @@ impl TryFrom<V8KvCheck> for KvCheck {
}
}
-type V8KvMutation = (KvKey, String, Option<FromV8Value>);
+type V8KvMutation = (KvKey, String, Option<FromV8Value>, Option<u64>);
impl TryFrom<V8KvMutation> for KvMutation {
type Error = AnyError;
@@ -396,7 +396,11 @@ impl TryFrom<V8KvMutation> for KvMutation {
)))
}
};
- Ok(KvMutation { key, kind })
+ Ok(KvMutation {
+ key,
+ kind,
+ expire_at: value.3,
+ })
}
}