CLI for Fjall database
Command
The command requires --db <PATH> or FJALL_DB.
Subcommands
keyspace <KEYSPACE> <SUBCOMMAND>runs keyspace-scoped operations:iter,get,insert,contains,len,clear,delete.list-keyspace-nameslists keyspace names (one per line).keyspace-countprints the number of keyspaces.
Exit codes for keyspace <KEYSPACE> contains <KEY>:
0- key exists1- error occurred127- key does not exist
Byte encodings
Commands that accept key/value bytes support --*-encoding with:
string(default)hexpathempty(argument must be exactly-)
Example
DB_DIR=""
# 1
# 1
# exit code: 0
# exit code: 127
# value
# key:value
# items
# 0
Known bugs
clearmay not persistently clear a keyspace in fjall v3.0.1 due to fjall-rs/fjall#241.
Installation
Install as executable:
cargo install --locked fjall-cli
Install as library dependency in your package:
cargo add fjall-cli
Usage
CLI for Fjall database
Usage: fjall --db <DB> <COMMAND>
Commands:
keyspace
list-keyspace-names
keyspace-count
help Print this message or the help of the given subcommand(s)
Options:
--db <DB> [env: FJALL_DB=]
-h, --help Print help
-V, --version Print version
Gratitude
Like the project? ⭐ Star this repo on GitHub!
License
Apache-2.0 or MIT.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, shall be licensed as above, without any additional terms or conditions.