MCPcopy Index your code
hub / github.com/dgraph-io/dgraph / TestDeletePredicate

Function TestDeletePredicate

dgraph/cmd/alpha/run_test.go:159–264  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

157}
158
159func TestDeletePredicate(t *testing.T) {
160 var m1 = `
161 {
162 set {
163 <0x1> <friend> <0x2> .
164 <0x1> <friend> <0x3> .
165 <0x1> <name> "Alice" .
166 <0x2> <name> "Alice1" .
167 <0x3> <name> "Alice2" .
168 <0x3> <age> "13" .
169 <0x11> <salary> "100000" . # should be deleted from schema after we delete the predicate
170 }
171 }
172 `
173
174 var q1 = `
175 {
176 user(func: anyofterms(name, "alice")) {
177 friend {
178 name
179 }
180 }
181 }
182 `
183 var q2 = `
184 {
185 user(func: uid(0x1, 0x2, 0x3)) {
186 name
187 }
188 }
189 `
190 var q3 = `
191 {
192 user(func: uid(0x3)) {
193 age
194 ~friend {
195 name
196 }
197 }
198 }
199 `
200
201 var q4 = `
202 {
203 user(func: uid(0x3)) {
204 age
205 friend {
206 name
207 }
208 }
209 }
210 `
211
212 var s1 = `
213 friend: [uid] @reverse .
214 name: string @index(term) .
215 `
216

Callers

nothing calls this directly

Calls 8

ParseBytesFunction · 0.92
CompareJSONFunction · 0.92
dropAllFunction · 0.85
alterSchemaWithRetryFunction · 0.85
runGraphqlQueryFunction · 0.85
deletePredicateFunction · 0.85
runMutationFunction · 0.70

Tested by

no test coverage detected