Skip to content

Commit

Permalink
Add support for Conditional Upsert (#3612)
Browse files Browse the repository at this point in the history
  • Loading branch information
mangalaman93 committed Aug 8, 2019
1 parent d25ab25 commit 5eaa395
Show file tree
Hide file tree
Showing 6 changed files with 765 additions and 55 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 5eaa395

Please sign in to comment.