Skip to content

Commit

Permalink
Add support for conditional mutation in Upsert Block (#3612)
Browse files Browse the repository at this point in the history
(cherry picked from commit 7e1cce4)
  • Loading branch information
mangalaman93 authored and danielmai committed Aug 9, 2019
1 parent d5c5a9e commit a62bcd6
Show file tree
Hide file tree
Showing 8 changed files with 1,052 additions and 296 deletions.
7 changes: 7 additions & 0 deletions dgraph/cmd/alpha/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,13 @@ func mutationHandler(w http.ResponseWriter, r *http.Request) {
return
}
}
if condText, ok := ms["cond"]; ok && condText != nil {
mu.Cond, err = strconv.Unquote(string(condText.bs))
if err != nil {
x.SetStatus(w, x.ErrorInvalidRequest, err.Error())
return
}
}

case "application/rdf":
// Parse N-Quads.
Expand Down
Loading

0 comments on commit a62bcd6

Please sign in to comment.