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 b0f126e commit d6af378
Show file tree
Hide file tree
Showing 6 changed files with 916 additions and 212 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 d6af378

Please sign in to comment.