You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|[conditional_execution](/advanced-algorithms/available-algorithms/conditional_execution)| C++ | Define conditions not expressible in Cypher and and use them to control query execution. |
87
86
|[collections](/advanced-algorithms/available-algorithms/collections)| C++ | The collections module is a collection manipulation module that offers functions to work with lists in Cypher queries, allowing operations like filtering, sorting, and modification for efficient data handling. |
88
87
|[create](/advanced-algorithms/available-algorithms/create)| C++ | The create module is a set of powerful tools that provide additional capabilities for creating nodes and relationships in the Memgraph graph database. |
88
+
|[csv_utils](/advanced-algorithms/available-algorithms/csv_utils)| C++ | An utility module for creating and deleting CSV files. |
89
89
|[date](/advanced-algorithms/available-algorithms/date)| C++ | The `date` module provides various utilities to handle date and time operations within the Cypher query language. |
90
+
|[do](/advanced-algorithms/available-algorithms/do)| C++ | A module that is used to define conditions not expressible in Cypher to control query execution. |
90
91
|[export_util](/advanced-algorithms/available-algorithms/export_util)| Python | A module for exporting the graph database in different formats (JSON). |
91
92
|[graph_analyzer](/advanced-algorithms/available-algorithms/graph_analyzer)| Python | This Graph Analyzer query module offers insights about the stored graph or a subgraph. |
92
93
|[graph_util](/advanced-algorithms/available-algorithms/graph_util)| C++ | A module with common graph algorithms and graph manipulation utilities |
@@ -95,7 +96,7 @@ If you want to know more and learn how this affects you, read our [announcement]
95
96
|[label](/advanced-algorithms/available-algorithms/label)| C++ | The `label` module provides an array of utilities for working with labels. |
96
97
|[llm_util](/advanced-algorithms/available-algorithms/llm_util)| Python | A module that contains procedures describing graphs in a format best suited for large language models (LLMs). |
97
98
|[map](/advanced-algorithms/available-algorithms/map)| C++ | The map module offers a versatile toolkit for manipulating collections of key-value pairs, enabling advanced data operations within a graph database context |
98
-
|[merge](/advanced-algorithms/available-algorithms/merge)| C++ | A module which provides the capabilities of the `MERGE` Cypher command, merging or creating nodes and relationships as per specified conditions. It ensures precision and coherence in managing interconnected data structure. |
99
+
|[merge](/advanced-algorithms/available-algorithms/merge)| C++ | A module which provides the capabilities of the `MERGE` Cypher command, merging or creating nodes and relationships as per specified conditions. It ensures precision and coherence in managing interconnected data structure. |
99
100
|[meta](/advanced-algorithms/available-algorithms/meta)| C++ | Provides information about graph nodes and relationships. |
100
101
|[meta_util](/advanced-algorithms/available-algorithms/meta_util)| Python | A module that contains procedures describing graphs on a meta-level. |
101
102
|[migrate](/advanced-algorithms/available-algorithms/migrate)| Python | A module that can access data from a MySQL, SQL Server or Oracle database. |
@@ -104,7 +105,8 @@ If you want to know more and learn how this affects you, read our [announcement]
104
105
|[nodes](/advanced-algorithms/available-algorithms/nodes)| C++ | A module that provides a comprehensive toolkit for managing multiple graph nodes, enabling linking, updating, type deduction and more. |
105
106
|[periodic](/advanced-algorithms/available-algorithms/periodic)| C++ | A module containing procedures for periodically running difficult and/or memory/time consuming queries. |
106
107
|[refactor](/advanced-algorithms/available-algorithms/refactor)| C++ | The refactor module provides utilities for changing nodes and relationships. |
107
-
|[rust_example](https://github.com/memgraph/mage/tree/main/rust/rsmgp-example)| Rust | Example of a basic module with input parameters forwarding, made in Rust. |[set_property](/advanced-algorithms/available-algorithms/set_property)| C++ | A module for dynamical access and editing of node and relationship properties. |
108
+
|[rust_example](https://github.com/memgraph/mage/tree/main/rust/rsmgp-example)| Rust | Example of a basic module with input parameters forwarding, made in Rust. |
109
+
|[set_property](/advanced-algorithms/available-algorithms/set_property)| C++ | A module for dynamical access and editing of node and relationship properties. |
108
110
|[temporal](/advanced-algorithms/available-algorithms/temporal)| Python | A module that provides functions to handle temporal (time-related) operations and offers extended capabilities compared to the date module. |
109
111
|[text](/advanced-algorithms/available-algorithms/text)| C++ | The `text` module offers a toolkit for manipulating strings. |
110
112
|[util_module](/advanced-algorithms/available-algorithms/util_module)| C++ | A module which offers a range of functions for tasks such as validation and creating cryptographic hash values. This module serves as a practical resource for streamlining a variety of tasks related to database operations. |
Copy file name to clipboardExpand all lines: pages/advanced-algorithms/available-algorithms/do.mdx
+11-5
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: conditional_execution
2
+
title: do
3
3
description: Optimize your graph computing workflow with Memgraph's conditional execution capabilities. Explore tutorials and comprehensive documentation to learn how to execute specific operations based on conditions within your graphs.
4
4
---
5
5
@@ -8,7 +8,7 @@ import { Steps } from 'nextra/components'
8
8
import { Cards } from'nextra/components'
9
9
importGitHubfrom'/components/icons/GitHub'
10
10
11
-
# conditional_execution
11
+
# do
12
12
13
13
Queries might require conditional execution logic that can’t be adequately
14
14
expressed in Cypher. The `do` module makes it possible to define complex logic
@@ -30,6 +30,10 @@ that will control query execution.
30
30
31
31
## Procedures
32
32
33
+
<Callouttype="info">
34
+
You can execute this algorithm on [graph projections, subgraphs or portions of the graph](/advanced-algorithms/run-algorithms#run-procedures-on-subgraph).
35
+
</Callout>
36
+
33
37
The following procedures can't be used to run queries that execute global operations:
34
38
35
39
* creating and deleting indexes
@@ -47,7 +51,8 @@ Parameters are prefixed with `$` like `$param_name`. Check the documentation on
47
51
querying for [examples](/querying/expressions#parameters).
48
52
49
53
{<h4className="custom-header"> Input: </h4>}
50
-
54
+
*`subgraph: Graph` (**OPTIONAL**) ➡ A specific subgraph, which is an [object of type Graph](/advanced-algorithms/run-algorithms#run-procedures-on-subgraph) returned by the `project()` function, on which the algorithm is run.
55
+
If subgraph is not specified, the algorithm is computed on the entire graph by default.
51
56
*`conditionals: List[Any]` ➡ Variable-length list of condition-query pairs
52
57
structured as `[condition, query, condition, query, …]`. Conditions are
53
58
`boolean` and queries are `string`.
@@ -88,7 +93,8 @@ RETURN value.graph_status AS graph_status;
88
93
`$param_name`.
89
94
90
95
{<h4className="custom-header"> Input: </h4>}
91
-
96
+
*`subgraph: Graph` (**OPTIONAL**) ➡ A specific subgraph, which is an [object of type Graph](/advanced-algorithms/run-algorithms#run-procedures-on-subgraph) returned by the `project()` function, on which the algorithm is run.
97
+
If subgraph is not specified, the algorithm is computed on the entire graph by default.
92
98
*`condition: boolean` ➡ Determines what query to execute.
93
99
*`if_query: string` ➡ The query to be executed if the condition is satisfied.
94
100
*`else_query: string (default = "")` ➡ The query to be executed if the
@@ -123,7 +129,7 @@ RETURN value.graph_status AS graph_status;
0 commit comments