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
Given I execute the "UPDATE [nt:unstructured] AS a SET a.tags = array_replace(a.tags, 'Trains', 'Rockets') WHERE a.tags = 'Trains'" command
28
+
Given I execute the "UPDATE [nt:unstructured] AS a SET a.tags = array_replace(a.tags, 'Trains', 'Rockets') WHERE a.tags = 'Trains';" command
29
29
Then the command should not fail
30
30
And I save the session
31
31
Then the command should not fail
32
32
And the node at "/cms/articles/article1" should have the property "tags" with value "Rockets" at index "1"
33
33
34
34
Scenario: Set a multivalue value
35
-
Given I execute the "UPDATE [nt:unstructured] AS a SET a.tags = array('Rockets', 'Dragons')" command
35
+
Given I execute the "UPDATE [nt:unstructured] AS a SET a.tags = array('Rockets', 'Dragons');" command
36
36
Then the command should not fail
37
37
And I save the session
38
38
Then the command should not fail
39
39
And the node at "/cms/articles/article1" should have the property "tags" with value "Rockets" at index "0"
40
40
And the node at "/cms/articles/article1" should have the property "tags" with value "Dragons" at index "1"
41
41
42
42
Scenario: Update single multivalue without selector
43
-
Given I execute the "UPDATE [nt:unstructured] SET tags = array_replace(tags, 'Planes', 'Rockets') WHERE tags = 'Planes'" command
43
+
Given I execute the "UPDATE [nt:unstructured] SET tags = array_replace(tags, 'Planes', 'Rockets') WHERE tags = 'Planes';" command
44
44
Then the command should not fail
45
45
And I save the session
46
46
Then the command should not fail
@@ -52,7 +52,7 @@ Feature: Execute a a raw UPDATE query in JCR_SQL2
52
52
And the node at "/cms/articles/article1" should have the property "tags" with value "Automobiles" at index "2"
53
53
54
54
Scenario: Remove single multivalue
55
-
Given I execute the "UPDATE [nt:unstructured] AS a SET a.tags = array_remove(a.tags, 'Planes') WHERE a.tags = 'Planes'" command
55
+
Given I execute the "UPDATE [nt:unstructured] AS a SET a.tags = array_remove(a.tags, 'Planes') WHERE a.tags = 'Planes';" command
56
56
And I save the session
57
57
Then the command should not fail
58
58
And I should see the following:
@@ -63,7 +63,7 @@ Feature: Execute a a raw UPDATE query in JCR_SQL2
63
63
And the node at "/cms/articles/article1" should have the property "tags" with value "Automobiles" at index "1"
64
64
65
65
Scenario: Remove single multivalue by index
66
-
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
+
Given I execute the "UPDATE [nt:unstructured] AS a SET a.tags = array_replace_at(a.tags, 0, NULL) WHERE a.tags = 'Planes';" command
67
67
And I save the session
68
68
Then the command should not fail
69
69
And I should see the following:
@@ -74,7 +74,7 @@ Feature: Execute a a raw UPDATE query in JCR_SQL2
74
74
And the node at "/cms/articles/article1" should have the property "tags" with value "Automobiles" at index "1"
75
75
76
76
Scenario: Add a multivalue property
77
-
Given I execute the "UPDATE [nt:unstructured] AS a SET a.tags = array_append(a.tags, 'Kite') WHERE a.tags = 'Planes'" command
77
+
Given I execute the "UPDATE [nt:unstructured] AS a SET a.tags = array_append(a.tags, 'Kite') WHERE a.tags = 'Planes';" command
78
78
And I save the session
79
79
Then the command should not fail
80
80
And I should see the following:
@@ -86,7 +86,7 @@ Feature: Execute a a raw UPDATE query in JCR_SQL2
86
86
And the node at "/cms/articles/article1" should have the property "tags" with value "Kite" at index "3"
87
87
88
88
Scenario: Replace a multivalue property by index
89
-
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
+
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
90
90
And I save the session
91
91
Then the command should not fail
92
92
And I should see the following:
@@ -98,43 +98,43 @@ Feature: Execute a a raw UPDATE query in JCR_SQL2
98
98
And the node at "/cms/articles/article1" should have the property "tags" with value "foobar" at index "2"
99
99
100
100
Scenario: Replace a multivalue property by invalid index
101
-
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
+
Given I execute the "UPDATE [nt:unstructured] AS a SET a.tags = array_replace_at(a.tags, 10, 'Kite') WHERE a.tags = 'Planes';" command
102
102
Then the command should fail
103
103
And I should see the following:
104
104
"""
105
105
Multivalue index "10" does not exist
106
106
"""
107
107
108
108
Scenario: Attempt to update a numerically named property (must use a selector)
109
-
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
+
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
110
110
Then the command should fail
111
111
And I should see the following:
112
112
"""
113
113
[PHPCR\PathNotFoundException] Property 10
114
114
"""
115
115
116
116
Scenario: Apply mixin_remove
117
-
Given I execute the "UPDATE [nt:unstructured] AS a APPLY mixin_remove('mix:title') WHERE a.name = 'Product Two'" command
117
+
Given I execute the "UPDATE [nt:unstructured] AS a APPLY mixin_remove('mix:title') WHERE a.name = 'Product Two';" command
118
118
Then the command should not fail
119
119
And I save the session
120
120
Then the command should not fail
121
121
Then the node at "/cms/products/product2" should not have the mixin "mix:title"
122
122
123
123
Scenario: Apply mixin_add
124
-
Given I execute the "UPDATE [nt:unstructured] AS a APPLY mixin_add('mix:mimeType') WHERE a.tags = 'Planes'" command
124
+
Given I execute the "UPDATE [nt:unstructured] AS a APPLY mixin_add('mix:mimeType') WHERE a.tags = 'Planes';" command
125
125
Then the command should not fail
126
126
And I save the session
127
127
And the node at "/cms/articles/article1" should have the mixin "mix:mimeType"
128
128
129
129
Scenario: Apply mixin_add existing
130
-
Given I execute the "UPDATE [nt:unstructured] AS a APPLY mixin_add('mix:title') WHERE a.name = 'Product Two'" command
130
+
Given I execute the "UPDATE [nt:unstructured] AS a APPLY mixin_add('mix:title') WHERE a.name = 'Product Two';" command
131
131
Then the command should not fail
132
132
And I save the session
133
133
Then the command should not fail
134
134
Then the node at "/cms/products/product2" should have the mixin "mix:title"
135
135
136
136
Scenario: Apply multiple functions
137
-
Given I execute the "UPDATE [nt:unstructured] AS a APPLY mixin_add('mix:mimeType'), mixin_add('mix:lockable') WHERE a.tags = 'Planes'" command
137
+
Given I execute the "UPDATE [nt:unstructured] AS a APPLY mixin_add('mix:mimeType'), mixin_add('mix:lockable') WHERE a.tags = 'Planes';" command
138
138
Then the command should not fail
139
139
And I save the session
140
140
And the node at "/cms/articles/article1" should have the mixin "mix:mimeType"
@@ -149,10 +149,10 @@ Feature: Execute a a raw UPDATE query in JCR_SQL2
0 commit comments