Closed Rhal95 closed 10 months ago
Hi again ๐ I fixed the unpacking of the KvEntry for Deno KV. Please take a look at the PR and tell me if everything is okay. Thank you.
Thank you for pull request! Merged it.๐ Sorry for the delay๐๐
DenoKV ใฎ get()
ใฏใๅคใใใฎใพใพ่ฟใใ KvEntryMaybe
ใ่ฟใไปๆงใงใใใ
{
key: KvKey,
value: null,
versionstamp: null
}
ใใฎใใซใชใฏใง c.session.value
ใซ value
ใไปฃๅ
ฅใใใใไฟฎๆญฃใใใพใใใ
Hi ๐
Deno KV will always return a
Deno.KvEntry
when usingkv.get()
. Even when no value is found for the key. If no value is found, the value in the entry isnull
. TheSessionManager
does not unpack this value and puts theDeno.KvEntry
intoc.session.value
. This means I have to unpack the value myself every time I want to access it. This also means I can not use the renew and regenerate functions. Those will just put the session value back into thecreateSession
function which will nest theDeno.KvEntry
in anotherDeno.KvEntry
.If you want I can submit a PR for this tomorrow.