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
Copy file name to clipboardExpand all lines: features/phpcr_query_update.feature
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -62,7 +62,7 @@ Feature: Execute a a raw UPDATE query in JCR_SQL2
62
62
And the node at "/cms/articles/article1" should have the property "tags" with value "Automobiles" at index "1"
63
63
64
64
Scenario: Remove single multivalue by index
65
-
Given I execute the "UPDATE [nt:unstructured] AS a SET a.tags = array_set(a.tags, 0, NULL) WHERE a.tags = 'Planes'" command
65
+
Given I execute the "UPDATE [nt:unstructured] AS a SET a.tags = array_replace_at(a.tags, 0, NULL) WHERE a.tags = 'Planes'" command
66
66
And I save the session
67
67
Then the command should not fail
68
68
And I should see the following:
@@ -85,7 +85,7 @@ Feature: Execute a a raw UPDATE query in JCR_SQL2
85
85
And the node at "/cms/articles/article1" should have the property "tags" with value "Kite" at index "3"
86
86
87
87
Scenario: Replace a multivalue property by index
88
-
Given I execute the "UPDATE [nt:unstructured] AS a SET a.tags = array_set(a.tags, 1, 'Kite'), a.tags = array_set(a.tags, 2, 'foobar') WHERE a.tags = 'Planes'" command
88
+
Given I execute the "UPDATE [nt:unstructured] AS a SET a.tags = array_replace_at(a.tags, 1, 'Kite'), a.tags = array_replace_at(a.tags, 2, 'foobar') WHERE a.tags = 'Planes'" command
89
89
And I save the session
90
90
Then the command should not fail
91
91
And I should see the following:
@@ -97,23 +97,23 @@ Feature: Execute a a raw UPDATE query in JCR_SQL2
97
97
And the node at "/cms/articles/article1" should have the property "tags" with value "foobar" at index "2"
98
98
99
99
Scenario: Replace a multivalue property by invalid index
100
-
Given I execute the "UPDATE [nt:unstructured] AS a SET a.tags = array_set(a.tags, 10, 'Kite') WHERE a.tags = 'Planes'" command
100
+
Given I execute the "UPDATE [nt:unstructured] AS a SET a.tags = array_replace_at(a.tags, 10, 'Kite') WHERE a.tags = 'Planes'" command
101
101
Then the command should fail
102
102
And I should see the following:
103
103
"""
104
104
Multivalue index "10" does not exist
105
105
"""
106
106
107
107
Scenario: Attempt to update a numerically named property (must use a selector)
108
-
Given I execute the "UPDATE [nt:unstructured] AS a SET a.tags = array_set(a.tags, a.10, 'Kite') WHERE a.tags = 'Planes'" command
108
+
Given I execute the "UPDATE [nt:unstructured] AS a SET a.tags = array_replace_at(a.tags, a.10, 'Kite') WHERE a.tags = 'Planes'" command
109
109
Then the command should fail
110
110
And I should see the following:
111
111
"""
112
112
[PHPCR\PathNotFoundException] Property 10
113
113
"""
114
114
115
115
Scenario: Replace a multivalue property by invalid index with array (invalid)
116
-
Given I execute the "UPDATE [nt:unstructured] AS a SET a.tags = array_set(a.tags, 0, array('Kite')) WHERE a.tags = 'Planes'" command
116
+
Given I execute the "UPDATE [nt:unstructured] AS a SET a.tags = array_replace_at(a.tags, 0, array('Kite')) WHERE a.tags = 'Planes'" command
0 commit comments