Skip to main content

Crate fjall_cli

Crate fjall_cli 

Source
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-names lists keyspace names (one per line).
  • keyspace-count prints the number of keyspaces.

Exit codes for keyspace <KEYSPACE> contains <KEY>:

  • 0 - key exists
  • 1 - error occurred
  • 127 - key does not exist

§Byte encodings

Commands that accept key/value bytes support --*-encoding with:

  • string (default)
  • hex
  • path
  • empty (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

Structs§

ClearCommand
Command
ContainsCommand
DeleteCommand
GetCommand
InsertCommand
IterCommand
KeyspaceCommand
KeyspaceCountCommand
LenCommand
ListKeyspaceNamesCommand
OutputAffixes

Enums§

ByteEncoding
ByteEncodingDecodeError
ClearCommandRunError
CommandRunError
ContainsCommandRunError
DeleteCommandRunError
GetCommandRunError
InsertCommandRunError
IterCommandRunError
IterCommandWriteItemError
IterCommandWriteItemsError
KeyspaceCommandRunError
KeyspaceCountCommandRunError
KeyspaceSubcommand
LenCommandRunError
ListKeyspaceNamesCommandRunError
OutputKind
OutputKindWriteError
PrefixKind
Subcommand
SubcommandRunError

Type Aliases§

Suffix