Skip to content

Conversation

@shahar-biron
Copy link
Contributor

@shahar-biron shahar-biron commented Nov 9, 2025

Description

This PR adds documentation for the new db.meta.stats() procedure in FalkorDB.

Changes

  • Added db.meta.stats() to the procedures table in cypher/procedures.md

Procedure Details

db.meta.stats() - Returns comprehensive graph statistics including:

  • labels: Map of labels with their node counts
  • relTypes: Map of relationship types with their edge counts
  • relCount: Total number of relationships
  • nodeCount: Total number of nodes
  • labelCount: Number of distinct labels
  • relTypeCount: Number of distinct relationship types
  • propertyKeyCount: Number of distinct property keys

This procedure provides a single, efficient call to retrieve all graph metadata and statistics, useful for monitoring, analytics, and capacity planning.

Implementation Reference

  • Source: /src/procedures/proc_meta_stats.c
  • Tests: /tests/flow/test_meta_stats.py

Notes

This documentation is ready to be published when the feature is released in the next FalkorDB version.

Summary by CodeRabbit

  • New Features

    • Added a new db.meta.stats procedure to retrieve comprehensive graph statistics (labels, relationship types, node/relationship counts, property key counts, and related aggregates).
  • Documentation

    • Added documentation for the new statistics procedure including full yield information and descriptive summary of returned metrics.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 9, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Added documentation for a new database procedure db.meta.stats that returns graph statistics: labels, relationship types, relationship count, node count, label count, relationship type count, and property key count.

Changes

Cohort / File(s) Summary
Procedure documentation addition
cypher/procedures.md
Added new procedure db.meta.stats with yields: labels, relTypes, relCount, nodeCount, labelCount, relTypeCount, propertyKeyCount; included descriptive summary of returned graph statistics

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Documentation-only change; single file affected.

Poem

🐰 I hopped through docs with curious pats,
and found a new db.meta.stats.
Counting nodes, labels, keys so fine,
I scribble notes in carrot brine.
Hooray—our graph grows line by line. 🎉

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and clearly summarizes the main change: adding documentation for the db.meta.stats() procedure to the procedures table.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 312904e and 2c70727.

📒 Files selected for processing (1)
  • cypher/procedures.md (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
cypher/procedures.md (1)

30-30: Minor: Consider reordering procedures alphabetically.

The new db.meta.stats entry is inserted out of alphabetical order within the db.* namespace. Alphabetically, it should appear between db.labels and db.propertyKeys. Current order places it after db.propertyKeys.

If the table is intentionally organized by functional grouping (basic metadata queries, then advanced features), this placement makes sense. Otherwise, consider moving it for consistency.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6366c62 and 312904e.

📒 Files selected for processing (1)
  • cypher/procedures.md (1 hunks)
🔇 Additional comments (1)
cypher/procedures.md (1)

25-30: Documentation addition looks good.

The new procedure entry is well-formatted, includes all required yields, and provides a clear, informative description that aligns with the PR objectives. The table structure and formatting are consistent with existing entries.

To ensure completeness, please verify that:

  1. The yields listed (labels, relTypes, relCount, nodeCount, labelCount, relTypeCount, propertyKeyCount) exactly match the implementation in /src/procedures/proc_meta_stats.c
  2. The description accurately represents the procedure's behavior as tested in /tests/flow/test_meta_stats.py

use Yield term as in other procedures
@swilly22 swilly22 merged commit 85e60c2 into main Nov 9, 2025
3 of 4 checks passed
@swilly22 swilly22 deleted the docs/add-meta-stats-procedure branch November 9, 2025 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants