Skip to content

Commit d555d5a

Browse files
committed
Add framework for the union all logic for labels
I am going to need to write the union all part myself and take out the inheritance stuff. For both the ltree query part and to be able to partition labels in the future. Now I just need to find a way to support Prepared Statements...
1 parent 135f20f commit d555d5a

File tree

7 files changed

+365
-55
lines changed

7 files changed

+365
-55
lines changed

src/backend/nodes/ag_nodes.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ const char *node_names[] = {
6666
"cypher_merge_information",
6767
"cypher_create_graph",
6868
"cypher_use_graph",
69-
"cypher_drop_graph"
69+
"cypher_drop_graph",
70+
"cypher_label_tree_node"
7071
};
7172

7273
/*
@@ -135,7 +136,8 @@ const ExtensibleNodeMethods node_methods[] = {
135136
DEFINE_NODE_METHODS_EXTENDED(cypher_merge_information),
136137
DEFINE_NODE_METHODS(cypher_create_graph),
137138
DEFINE_NODE_METHODS(cypher_use_graph),
138-
DEFINE_NODE_METHODS(cypher_drop_graph)
139+
DEFINE_NODE_METHODS(cypher_drop_graph),
140+
DEFINE_NODE_METHODS(cypher_label_tree_node)
139141
};
140142

141143
static bool equal_ag_node(const ExtensibleNode *a, const ExtensibleNode *b)

src/backend/nodes/cypher_outfuncs.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,14 @@ void out_cypher_use_graph(StringInfo str, const ExtensibleNode *node)
451451
WRITE_STRING_FIELD(graph_name);
452452
}
453453

454+
void out_cypher_label_tree_node(StringInfo str, const ExtensibleNode *node)
455+
{
456+
DEFINE_AG_NODE(cypher_label_tree_node);
457+
458+
WRITE_NODE_FIELD(larg);
459+
WRITE_NODE_FIELD(rarg);
460+
WRITE_STRING_FIELD(label_name);
461+
}
454462

455463
void out_cypher_drop_graph(StringInfo str, const ExtensibleNode *node)
456464
{

0 commit comments

Comments
 (0)