You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use the list method and only pass the callback function, I can get all the key-value pairs in the database.
But when I use the prefix, I only get an empty array.
I'm sure there are keys with prefixes in the database.
In order to facilitate the demonstration of the problem, I wrote a simple demo:
importhypertriefrom'hypertrie'importdotenvfrom'dotenv'importpathfrom'path'dotenv.config()letdbPath=path.join(process.env.EXPORT_FOLDER,process.env.STORE_FILE)letdb=hypertrie(dbPath,{valueEncoding: 'json'})letkey='p:4f7bbe1d-fe4a-45cb-bdf4-f2e67fefdb84'db.put(key,{'test': 'aaa'},err=>{if(err){console.error(err)}else{db.get(key,(err,value)=>{if(err){console.error(err)}else{console.info('get success',value)}})db.list('p',{},(err,value)=>{if(err){console.error(err)}else{console.info('list p success',value)}})db.list((err,value)=>{if(err){console.error(err)}else{console.info('list success',value)}})}})
terminal print:
Software info:
The text was updated successfully, but these errors were encountered:
Description
When I use the list method and only pass the callback function, I can get all the key-value pairs in the database.
But when I use the prefix, I only get an empty array.
I'm sure there are keys with prefixes in the database.
In order to facilitate the demonstration of the problem, I wrote a simple demo:
terminal print:

Software info:
The text was updated successfully, but these errors were encountered: