File tree Expand file tree Collapse file tree
cypher/Dependencies_Projection Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ // Check if the projection exists. Variables: dependencies_projection
2+
3+ RETURN CASE WHEN gds .graph .exists ($dependencies_projection + '-cleaned' ) THEN 1
4+ ELSE 0 END AS projectionCount
Original file line number Diff line number Diff line change @@ -112,6 +112,23 @@ verifyDataReadyForProjection() {
112112 fi
113113}
114114
115+ # Checks if the projection already exists.
116+ # Returns true (=0) if the projection exists.
117+ # Returns false (=1) if the projection doesn't exist.
118+ # Exits with an error if there are technical issues.
119+ # Required Parameters:
120+ # - dependencies_projection=...
121+ # Name prefix for the in-memory projection name for dependencies. Example: "type-centrality"
122+ projectionExists () {
123+ local verificationResult
124+ verificationResult=$( execute_cypher " ${PROJECTION_CYPHER_DIR} /Dependencies_0_Check_Projection_Exists.cypher" " ${@ } " )
125+ if is_csv_column_greater_zero " ${verificationResult} " " projectionCount" ; then
126+ true ;
127+ else
128+ false ;
129+ fi
130+ }
131+
115132# Creates a directed Graph projection for dependencies between nodes specified by the parameter "dependencies_projection_node".
116133# Nodes without incoming and outgoing dependencies will be filtered out using a subgraph.
117134#
You can’t perform that action at this time.
0 commit comments