Expand description
§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="$(mktemp -d)"
export FJALL_DB="$DB_DIR"
fjall keyspace items insert key value
fjall keyspace items len
# 1
fjall keyspace-count
# 1
fjall keyspace items contains key
# exit code: 0
fjall keyspace items contains missing
# exit code: 127
fjall keyspace items get key
# value
fjall keyspace items iter --key-suffix ":" --value-suffix $'\n'
# key:value
fjall list-keyspace-names
# items
fjall keyspace items delete
fjall keyspace-count
# 0§Known bugs
clearmay not persistently clear a keyspace in fjall v3.0.1 due to fjall-rs/fjall#241.
Structs§
- Clear
Command - Command
- Contains
Command - Delete
Command - GetCommand
- Insert
Command - Iter
Command - Keyspace
Command - Keyspace
Count Command - LenCommand
- List
Keyspace Names Command - Output
Affixes
Enums§
- Byte
Encoding - Byte
Encoding Decode Error - Clear
Command RunError - Command
RunError - Contains
Command RunError - Delete
Command RunError - GetCommand
RunError - Insert
Command RunError - Iter
Command RunError - Iter
Command Write Item Error - Iter
Command Write Items Error - Keyspace
Command RunError - Keyspace
Count Command RunError - Keyspace
Subcommand - LenCommand
RunError - List
Keyspace Names Command RunError - Output
Kind - Output
Kind Write Error - Prefix
Kind - Subcommand
- Subcommand
RunError