@@ -45,6 +45,18 @@ public class Create {
4545 public Transaction tx ;
4646
4747 @ Procedure (name = "apoc.create.node" , mode = Mode .WRITE )
48+ @ QueryLanguageScope (scope = {QueryLanguage .CYPHER_5 })
49+ @ Description ("Creates a `NODE` with the given dynamic labels." )
50+ public Stream <CreatedNodeResult > nodeCypher5 (
51+ @ Name (value = "labels" , description = "The labels to assign to the new node." ) List <String > labelNames ,
52+ @ Name (value = "props" , description = "The properties to assign to the new node." )
53+ Map <String , Object > props ) {
54+ return node (labelNames , props );
55+ }
56+
57+ @ Deprecated
58+ @ Procedure (name = "apoc.create.node" , mode = Mode .WRITE , deprecatedBy = "Cypher's dynamic labels: `CREATE (n:$(labels)) SET n = props`" )
59+ @ QueryLanguageScope (scope = {QueryLanguage .CYPHER_25 })
4860 @ Description ("Creates a `NODE` with the given dynamic labels." )
4961 public Stream <CreatedNodeResult > node (
5062 @ Name (value = "labels" , description = "The labels to assign to the new node." ) List <String > labelNames ,
@@ -54,6 +66,17 @@ public Stream<CreatedNodeResult> node(
5466 }
5567
5668 @ Procedure (name = "apoc.create.addLabels" , mode = Mode .WRITE )
69+ @ QueryLanguageScope (scope = {QueryLanguage .CYPHER_5 })
70+ @ Description ("Adds the given labels to the given `NODE` values." )
71+ public Stream <UpdatedNodeResult > addLabelsCypher5 (
72+ @ Name (value = "nodes" , description = "The nodes to add labels to." ) Object nodes ,
73+ @ Name (value = "labels" , description = "The labels to add to the nodes." ) List <String > labelNames ) {
74+ return addLabels (nodes , labelNames );
75+ }
76+
77+ @ Deprecated
78+ @ Procedure (name = "apoc.create.addLabels" , mode = Mode .WRITE , deprecatedBy = "Cypher's dynamic labels; `SET n:$(labels)`." )
79+ @ QueryLanguageScope (scope = {QueryLanguage .CYPHER_25 })
5780 @ Description ("Adds the given labels to the given `NODE` values." )
5881 public Stream <UpdatedNodeResult > addLabels (
5982 @ Name (value = "nodes" , description = "The nodes to add labels to." ) Object nodes ,
@@ -69,6 +92,18 @@ public Stream<UpdatedNodeResult> addLabels(
6992 }
7093
7194 @ Procedure (name = "apoc.create.setProperty" , mode = Mode .WRITE )
95+ @ QueryLanguageScope (scope = {QueryLanguage .CYPHER_5 })
96+ @ Description ("Sets the given property to the given `NODE` values." )
97+ public Stream <UpdatedNodeResult > setPropertyCypher5 (
98+ @ Name (value = "nodes" , description = "The nodes to set a property on." ) Object nodes ,
99+ @ Name (value = "key" , description = "The name of the property key to set." ) String key ,
100+ @ Name (value = "value" , description = "The value of the property to set." ) Object value ) {
101+ return setProperty (nodes , key , value );
102+ }
103+
104+ @ Deprecated
105+ @ Procedure (name = "apoc.create.setProperty" , mode = Mode .WRITE , deprecatedBy = "Cypher's dynamic properties: `SET node[key] = value`." )
106+ @ QueryLanguageScope (scope = {QueryLanguage .CYPHER_25 })
72107 @ Description ("Sets the given property to the given `NODE` values." )
73108 public Stream <UpdatedNodeResult > setProperty (
74109 @ Name (value = "nodes" , description = "The nodes to set a property on." ) Object nodes ,
@@ -81,6 +116,18 @@ public Stream<UpdatedNodeResult> setProperty(
81116 }
82117
83118 @ Procedure (name = "apoc.create.setRelProperty" , mode = Mode .WRITE )
119+ @ QueryLanguageScope (scope = {QueryLanguage .CYPHER_5 })
120+ @ Description ("Sets the given property on the `RELATIONSHIP` values." )
121+ public Stream <UpdatedRelationshipResult > setRelPropertyCypher5 (
122+ @ Name (value = "rels" , description = "The relationships to set a property on." ) Object rels ,
123+ @ Name (value = "key" , description = "The name of the property key to set." ) String key ,
124+ @ Name (value = "value" , description = "The value of the property to set." ) Object value ) {
125+ return setRelProperty (rels , key , value );
126+ }
127+
128+ @ Deprecated
129+ @ Procedure (name = "apoc.create.setRelProperty" , mode = Mode .WRITE , deprecatedBy = "Cypher's dynamic properties: `SET rel[key] = value`." )
130+ @ QueryLanguageScope (scope = {QueryLanguage .CYPHER_25 })
84131 @ Description ("Sets the given property on the `RELATIONSHIP` values." )
85132 public Stream <UpdatedRelationshipResult > setRelProperty (
86133 @ Name (value = "rels" , description = "The relationships to set a property on." ) Object rels ,
@@ -93,6 +140,19 @@ public Stream<UpdatedRelationshipResult> setRelProperty(
93140 }
94141
95142 @ Procedure (name = "apoc.create.setProperties" , mode = Mode .WRITE )
143+ @ QueryLanguageScope (scope = {QueryLanguage .CYPHER_5 })
144+ @ Description ("Sets the given properties to the given `NODE` values." )
145+ public Stream <UpdatedNodeResult > setPropertiesCypher5 (
146+ @ Name (value = "nodes" , description = "The nodes to set properties on." ) Object nodes ,
147+ @ Name (value = "keys" , description = "The property keys to set on the given nodes." ) List <String > keys ,
148+ @ Name (value = "values" , description = "The values to assign to the properties on the given nodes." )
149+ List <Object > values ) {
150+ return setProperties (nodes , keys , values );
151+ }
152+
153+ @ Deprecated
154+ @ Procedure (name = "apoc.create.setProperties" , mode = Mode .WRITE , deprecatedBy = "Cypher's dynamic properties: `SET node[key] = value`." )
155+ @ QueryLanguageScope (scope = {QueryLanguage .CYPHER_25 })
96156 @ Description ("Sets the given properties to the given `NODE` values." )
97157 public Stream <UpdatedNodeResult > setProperties (
98158 @ Name (value = "nodes" , description = "The nodes to set properties on." ) Object nodes ,
@@ -106,6 +166,18 @@ public Stream<UpdatedNodeResult> setProperties(
106166 }
107167
108168 @ Procedure (name = "apoc.create.removeProperties" , mode = Mode .WRITE )
169+ @ QueryLanguageScope (scope = {QueryLanguage .CYPHER_5 })
170+ @ Description ("Removes the given properties from the given `NODE` values." )
171+ public Stream <UpdatedNodeResult > removePropertiesCypher5 (
172+ @ Name (value = "nodes" , description = "The nodes to remove properties from." ) Object nodes ,
173+ @ Name (value = "keys" , description = "The property keys to remove from the given nodes." )
174+ List <String > keys ) {
175+ return removeProperties (nodes , keys );
176+ }
177+
178+ @ Deprecated
179+ @ Procedure (name = "apoc.create.removeProperties" , mode = Mode .WRITE , deprecatedBy = "Cypher's dynamic properties: `REMOVE node[key]`." )
180+ @ QueryLanguageScope (scope = {QueryLanguage .CYPHER_25 })
109181 @ Description ("Removes the given properties from the given `NODE` values." )
110182 public Stream <UpdatedNodeResult > removeProperties (
111183 @ Name (value = "nodes" , description = "The nodes to remove properties from." ) Object nodes ,
@@ -118,6 +190,20 @@ public Stream<UpdatedNodeResult> removeProperties(
118190 }
119191
120192 @ Procedure (name = "apoc.create.setRelProperties" , mode = Mode .WRITE )
193+ @ QueryLanguageScope (scope = {QueryLanguage .CYPHER_5 })
194+ @ Description ("Sets the given properties on the `RELATIONSHIP` values." )
195+ public Stream <UpdatedRelationshipResult > setRelPropertiesCypher5 (
196+ @ Name (value = "rels" , description = "The relationships to set properties on." ) Object rels ,
197+ @ Name (value = "keys" , description = "The keys of the properties to set on the given relationships." )
198+ List <String > keys ,
199+ @ Name (value = "values" , description = "The values of the properties to set on the given relationships." )
200+ List <Object > values ) {
201+ return setRelProperties (rels , keys , values );
202+ }
203+
204+ @ Deprecated
205+ @ Procedure (name = "apoc.create.setRelProperties" , mode = Mode .WRITE , deprecatedBy = "Cypher's dynamic properties: `SET rel[key] = value`." )
206+ @ QueryLanguageScope (scope = {QueryLanguage .CYPHER_25 })
121207 @ Description ("Sets the given properties on the `RELATIONSHIP` values." )
122208 public Stream <UpdatedRelationshipResult > setRelProperties (
123209 @ Name (value = "rels" , description = "The relationships to set properties on." ) Object rels ,
@@ -132,6 +218,18 @@ public Stream<UpdatedRelationshipResult> setRelProperties(
132218 }
133219
134220 @ Procedure (name = "apoc.create.removeRelProperties" , mode = Mode .WRITE )
221+ @ QueryLanguageScope (scope = {QueryLanguage .CYPHER_5 })
222+ @ Description ("Removes the given properties from the given `RELATIONSHIP` values." )
223+ public Stream <UpdatedRelationshipResult > removeRelPropertiesCypher5 (
224+ @ Name (value = "rels" , description = "The relationships to remove properties from." ) Object rels ,
225+ @ Name (value = "keys" , description = "The property keys to remove from the given nodes." )
226+ List <String > keys ) {
227+ return removeRelProperties (rels , keys );
228+ }
229+
230+ @ Deprecated
231+ @ Procedure (name = "apoc.create.removeRelProperties" , mode = Mode .WRITE , deprecatedBy = "Cypher's dynamic properties: `REMOVE rel[key]`." )
232+ @ QueryLanguageScope (scope = {QueryLanguage .CYPHER_25 })
135233 @ Description ("Removes the given properties from the given `RELATIONSHIP` values." )
136234 public Stream <UpdatedRelationshipResult > removeRelProperties (
137235 @ Name (value = "rels" , description = "The relationships to remove properties from." ) Object rels ,
@@ -144,6 +242,17 @@ public Stream<UpdatedRelationshipResult> removeRelProperties(
144242 }
145243
146244 @ Procedure (name = "apoc.create.setLabels" , mode = Mode .WRITE )
245+ @ QueryLanguageScope (scope = {QueryLanguage .CYPHER_5 })
246+ @ Description ("Sets the given labels to the given `NODE` values. Non-matching labels are removed from the nodes." )
247+ public Stream <UpdatedNodeResult > setLabelsCypher5 (
248+ @ Name (value = "nodes" , description = "The nodes to set labels on." ) Object nodes ,
249+ @ Name (value = "labels" , description = "The labels to set on the given nodes." ) List <String > labelNames ) {
250+ return setLabels (nodes , labelNames );
251+ }
252+
253+ @ Deprecated
254+ @ Procedure (name = "apoc.create.setLabels" , mode = Mode .WRITE , deprecatedBy = "Cypher's dynamic labels; `SET n:$(labels)`." )
255+ @ QueryLanguageScope (scope = {QueryLanguage .CYPHER_25 })
147256 @ Description ("Sets the given labels to the given `NODE` values. Non-matching labels are removed from the nodes." )
148257 public Stream <UpdatedNodeResult > setLabels (
149258 @ Name (value = "nodes" , description = "The nodes to set labels on." ) Object nodes ,
@@ -164,6 +273,18 @@ public Stream<UpdatedNodeResult> setLabels(
164273 }
165274
166275 @ Procedure (name = "apoc.create.removeLabels" , mode = Mode .WRITE )
276+ @ QueryLanguageScope (scope = {QueryLanguage .CYPHER_5 })
277+ @ Description ("Removes the given labels from the given `NODE` values." )
278+ public Stream <UpdatedNodeResult > removeLabelsCypher (
279+ @ Name (value = "nodes" , description = "The node to remove labels from." ) Object nodes ,
280+ @ Name (value = "labels" , description = "The labels to remove from the given node." )
281+ List <String > labelNames ) {
282+ return removeLabels (nodes , labelNames );
283+ }
284+
285+ @ Deprecated
286+ @ Procedure (name = "apoc.create.removeLabels" , mode = Mode .WRITE , deprecatedBy = "Cypher's dynamic labels: `REMOVE node:$(labels)`" )
287+ @ QueryLanguageScope (scope = {QueryLanguage .CYPHER_25 })
167288 @ Description ("Removes the given labels from the given `NODE` values." )
168289 public Stream <UpdatedNodeResult > removeLabels (
169290 @ Name (value = "nodes" , description = "The node to remove labels from." ) Object nodes ,
@@ -180,6 +301,18 @@ public Stream<UpdatedNodeResult> removeLabels(
180301 }
181302
182303 @ Procedure (name = "apoc.create.nodes" , mode = Mode .WRITE )
304+ @ QueryLanguageScope (scope = {QueryLanguage .CYPHER_5 })
305+ @ Description ("Creates `NODE` values with the given dynamic labels." )
306+ public Stream <CreatedNodeResult > nodesCypher5 (
307+ @ Name (value = "labels" , description = "The labels to assign to the new nodes." ) List <String > labelNames ,
308+ @ Name (value = "props" , description = "The properties to assign to the new nodes." )
309+ List <Map <String , Object >> props ) {
310+ return nodes (labelNames , props );
311+ }
312+
313+ @ Deprecated
314+ @ Procedure (name = "apoc.create.nodes" , mode = Mode .WRITE , deprecatedBy = "Cypher's dynamic labels: `UNWIND props AS p CREATE (n:$(labels)) SET n = p`" )
315+ @ QueryLanguageScope (scope = {QueryLanguage .CYPHER_25 })
183316 @ Description ("Creates `NODE` values with the given dynamic labels." )
184317 public Stream <CreatedNodeResult > nodes (
185318 @ Name (value = "labels" , description = "The labels to assign to the new nodes." ) List <String > labelNames ,
@@ -190,6 +323,21 @@ public Stream<CreatedNodeResult> nodes(
190323 }
191324
192325 @ Procedure (name = "apoc.create.relationship" , mode = Mode .WRITE )
326+ @ QueryLanguageScope (scope = {QueryLanguage .CYPHER_5 })
327+ @ Description ("Creates a `RELATIONSHIP` with the given dynamic relationship type." )
328+ public Stream <CreatedRelationshipResult > relationshipCypher5 (
329+ @ Name (value = "from" , description = "The node from which the outgoing relationship will start." ) Node from ,
330+ @ Name (value = "relType" , description = "The type to assign to the new relationship." ) String relType ,
331+ @ Name (value = "props" , description = "The properties to assign to the new relationship." )
332+ Map <String , Object > props ,
333+ @ Name (value = "to" , description = "The node to which the incoming relationship will be connected." )
334+ Node to ) {
335+ return relationship (from , relType , props , to );
336+ }
337+
338+ @ Deprecated
339+ @ Procedure (name = "apoc.create.relationship" , mode = Mode .WRITE , deprecatedBy = "Cypher's dynamic types: `CREATE (from)-[n:$(relType)]->(to) SET n = props`" )
340+ @ QueryLanguageScope (scope = {QueryLanguage .CYPHER_25 })
193341 @ Description ("Creates a `RELATIONSHIP` with the given dynamic relationship type." )
194342 public Stream <CreatedRelationshipResult > relationship (
195343 @ Name (value = "from" , description = "The node from which the outgoing relationship will start." ) Node from ,
0 commit comments