-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Iterating a specific kvsEnvStorage returns all key-value pairs for all databases #20
Comments
Thanks to report! Which env do you run this code? browser(IndexedDB sperate table name) kvs/packages/indexeddb/src/index.ts Lines 197 to 235 in bfa33d7
node kvs/packages/storage/src/storage.ts Lines 178 to 195 in bfa33d7
It seems that it has a bug that does not separate namespace… ( name is not used…)
|
Hello, thanks for the quick reply. We are using nodejs + discord.js so we used @kvs/env |
Thanks to confirm. #21 will fix it, but it will includes breaking change. |
We walked around this but it's kind of a problem if it fetches every item at every call. Thanks for the fix! |
This issue is fixed in https://github.com/azu/kvs/releases/tag/v2.0.0 Thanks for report! |
Let's say I've got two collections:
const A = async () => {
return await kvsEnvStorage({
name: "a_col",
version: 1,
})
}
const B = async () => {
return await kvsEnvStorage({
name: "b_col",
version: 1,
})
}
const storage = await A()
for await (const [key, value] of storage) {
console.log(key, value)
}
Will print items that belong to storage B as well.
Is this an error of my usage, or a bug?
The text was updated successfully, but these errors were encountered: