Skip to content
This repository was archived by the owner on Oct 10, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 56 additions & 8 deletions src/content/docs/cypher/query-clauses/call.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ The following tables lists the built-in schema functions you can use with the `C
| `SHOW_LOADED_EXTENSIONS` | returns all loaded extensions |
| `SHOW_INDEXES` | returns all indexes built in the system |
| `SHOW_PROJECTED_GRAPHS` | returns all existing projected graphs in the system |
| `PROJECTED_GRAPH_INFO` | returns the given projected graph information |

</div>

Expand Down Expand Up @@ -297,20 +298,67 @@ To list all existing projected graphs in a Kuzu database, you can use the `SHOW_
| Column | Description | Type |
| ------ | ----------- | ---- |
| name | the name of the projected graph | STRING |
| nodes | the nodes with predicates in the projected graph | STRING |
| rels | the rels with predicates in the projected graph | STRING |
| type | the type of the projected graph | STRING |

```cypher
CALL SHOW_PROJECTED_GRAPHS() RETURN *;
```

```
┌────────────────┬───────────────────────┬──────────────────────┐
│ name │ nodes │ rels │
│ STRING │ STRING │ STRING │
├────────────────┼───────────────────────┼──────────────────────┤
│ social_network │ [{'table': 'person'}] │ [{'table': 'knows'}] │
└────────────────┴───────────────────────┴──────────────────────┘
┌────────────────┬────────┐
│ name │ type │
│ STRING │ STRING │
├────────────────┼────────┤
│ student │ CYPHER │
│ social-network │ NATIVE │
└────────────────┴────────┘
```

### PROJECTED_GRAPH_INFO
To show the detail information of the projected graph, you can utilize the `PROJECTED_GRAPH_INFO` function.

There are two types of the projected graph:

### Native projected graph
| Column | Description | Type |
| ------ | ----------- | ---- |
| table type | the type of the table (NODE/REL) | STRING |
| table name | the name of the table | STRING |
| predicate | the predicates defined on the table | STRING |


### Cypher projected graph
| Column | Description | Type |
| ------ | ----------- | ---- |
| cypher statement | the cypher statement used to create the projected graph | STRING |

### Cypher

```cypher
call PROJECTED_GRAPH_INFO('student-social-network') RETURN *;
```

```
┌────────────┬────────────┬────────────────┐
│ table type │ table name │ predicate │
│ STRING │ STRING │ STRING │
├────────────┼────────────┼────────────────┤
│ NODE │ person │ n.age < 18 │
│ REL │ knows │ r.since > 1997 │
└────────────┴────────────┴────────────────┘
```

```cypher
call PROJECTED_GRAPH_INFO('student') RETURN *;
```

```
┌─────────────────────────────────────┐
│ cypher statement │
│ STRING │
├─────────────────────────────────────┤
│ MATCH (n) WHERE n.age < 18 RETURN n │
└─────────────────────────────────────┘
```

## YIELD
Expand Down