1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//! ## 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
//!
//! ```bash
//! 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 clear
//! fjall keyspace items len
//! # 0
//!
//! fjall keyspace items delete
//! fjall keyspace-count
//! # 0
//! ```
pub use *;
pub use *;