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 emp

Returns 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:

CommandPurposeExample return payload
SHOW BUCKETSLists all visible bucket collections{"data": ["emp", "mix"]}
SHOW BONDSLists every active graph bond relationship{"count": 1, "data": [...]}
SHOW INDEXESLists all active B+Tree secondary indexes{"count": 1, "data": [...]}
SHOW STATSAggregates document and bucket totals{"buckets": 1, "documents": 3, ...}
SHOW WEBHOOKSLists 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 STATS

Returns a breakdown across all collections:

CleaveQLExample · Stats JSON payload
{
  "buckets": 2,
  "documents": 14,
  "bonds": 8,
  "per_bucket": {
    "emp": 7,
    "mix": 7
  }
}