Sled support
joepio opened this issue · 14 comments
Hi there! I'm building a graph database using Sled, an embedded kv store wrote in rust. I'd love to use this tui tool to inspect my db state.
Would you consider adding sled support? It's pretty popular.
Definitely! Sled is in the roadmap
wow that was fast! Amazing :)
When I run without any CLI args, I get an error: thread 'main' panicked at 'Unable to read file: Os { code: 2, kind: NotFound, message: "No such file or directory" }', /Users/joep/.cargo/registry/src/github.com-1ecc6299db9ec823/edma-0.1.0-beta.5/src/config.rs:103:56
When I add a config file (see below), I can run it with edma --config-path edma.json
.
{
"databases": [
{
"name": "sled",
"path": "/Users/joep/Library/Application Support/atomic-data/store"
}
],
"templates": [
{
"name": "Custom layout",
"layouts": [
{
"name": "prop_val_sub_index",
"from": 0,
"to": 5,
"variant": "String"
},
{
"name": "reference_index_v1",
"from": 5,
"to": 10,
"variant": "Bytes"
}
]
}
]
}
In EDMA, however, no data is being shown. I've renamed the layouts to the trees of sled (not sure if that's required?)
@joepio Is your data stored in a tree or globally? If it is in a tree, can you try typing a command 'TREE=' then your tree name in the command editor field?
If I try a non-existing path in my databases.path
field in the config, there's no error shown. I guess we can't rule out that I'm having a config issue with the path, too.
@joepio After entering the command, makes sure to ENTER from keyboard. Are you the path to database is right?
If I try a non-existing path in my
databases.path
field in the config, there's no error shown. I guess we can't rule out that I'm having a config issue with the path, too.
I see, I will the error boundary in a later release.
Yeah I pressed enter. Maybe EDMA should throw if the path doesn't resolve to a SLED db, but I'm pretty sure my path is correct. I've tried a couple of combinations, too (relative, absolute, etc)
@joepio Ok guess there is a minor bug in loading from file path. Let me double check on my end and I'll let you know asap.
Ok thanks!
@joepio Just try the app again and it works perfectly. Can you use sled
API to list trees
and iterate to see if there is data there? I see you use Windows, mine is MacOS. Wonder if there are any compatibility issue with path absolute on different OS.