Returns the database version string.
GQLRETURN db.version()
Returns license information.
GQLRETURN db.license()
Returns a list of loaded plugins.
GQLRETURN db.plugins()
Returns statistics of the current graph, including node/edge counts, label counts, and properties.
GQLRETURN db.stats()
The returned record contains the following fields:
| Field | Type | Description |
|---|---|---|
graphName | STRING | Name of the current graph |
nodeCount | INT | Total number of nodes |
edgeCount | INT | Total number of edges |
unlabeledNodeCount | INT | Number of nodes without labels |
unlabeledEdgeCount | INT | Number of edges without labels |
labelCounts | RECORD | Node counts per label (e.g., {"Paper": 3}) |
edgeLabelCounts | RECORD | Edge counts per label (e.g., {"Cites": 2}) |
nodePropertyStats | RECORD | Node property counts per label (e.g., {"Paper": {"title": 3, "score": 3}}) |
edgePropertyStats | RECORD | Edge property counts per label (e.g., {"Cites": {"weight": 2}}) |
unlabeledNodePropertyStats | RECORD | Property counts for unlabeled nodes |
unlabeledEdgePropertyStats | RECORD | Property counts for unlabeled edges |
GQLLET stats = db.stats() RETURN stats.nodeCount AS nodes, stats.edgeCount AS edges
Returns the current graph overview with label counts and edge patterns.
GQLRETURN db.overview()
The returned record contains:
| Field | Type | Description |
|---|---|---|
labelCounts | LIST | List of {label, count, type} records for each node/edge label |
edgePatterns | LIST | List of {fromLabel, edgeLabel, toLabel, edgeCount} records describing connection patterns |
Returns all node labels in the current graph.
GQLRETURN db.nodeLabels()
Returns all edge labels in the current graph.
GQLRETURN db.edgeLabels()
Returns the properties defined for each label in the current graph. For closed graphs, returns schema-defined properties. For open graphs, discovers properties by scanning data.
GQLRETURN db.labelProperty()
The returned record maps each label name to a {type, properties} record, where type is "node" or "edge" and properties is a list of property names.
Rebuilds statistics from storage for the current graph.
GQLRETURN db.reloadStats()
Refer to Backup and Restore.