Getting Started
Tutorial: Building with CleaveDB
DESCRIBE & SHOW
Monitoring cluster health, inspecting bucket statistics, and listing database metadata are essential administrative duties. CleaveQL provides two specialized commands: DESCRIBE for detailed per-bucket summaries, and SHOW for global resource catalogs.
1. Inspecting a bucket with DESCRIBE
Run DESCRIBE to obtain an immediate diagnosis of document count and health for any bucket:
CleaveQLExample · Describe a populated bucket
DESCRIBE empReturns a human-readable confirmation with computed statistics:
CleaveQLExample · Output confirmation
Bucket 'emp' (7 docs). Stats computed successfully.If a bucket contains zero documents or has not yet been written to, it reports: Bucket 'nosuch' is empty.
2. Listing system resources with SHOW
The SHOW suite queries internal registries and presents organized JSON outputs:
| Command | Purpose | Example return payload |
|---|---|---|
| SHOW BUCKETS | Lists all visible bucket collections | {"data": ["emp", "mix"]} |
| SHOW BONDS | Lists every active graph bond relationship | {"count": 1, "data": [...]} |
| SHOW INDEXES | Lists all active B+Tree secondary indexes | {"count": 1, "data": [...]} |
| SHOW STATS | Aggregates document and bucket totals | {"buckets": 1, "documents": 3, ...} |
| SHOW WEBHOOKS | Lists registered Change Data Capture webhooks | {"count": 1, "data": [...]} |
Cluster Statistics (SHOW STATS)
SHOW STATS provides an instant snapshot of your storage utilization:
CleaveQLExample · Retrieve global stats
SHOW STATSReturns a breakdown across all collections:
CleaveQLExample · Stats JSON payload
{
"buckets": 2,
"documents": 14,
"bonds": 8,
"per_bucket": {
"emp": 7,
"mix": 7
}
}