Added command line options to ignore duplicate quad in add or missing quad in delete

This commit is contained in:
l.albertalli 2015-02-06 17:49:16 -08:00
parent 3c64b52e39
commit ce1cce5a01
5 changed files with 50 additions and 8 deletions

View file

@ -226,11 +226,19 @@ func (qs *QuadStore) ApplyDeltas(in []graph.Delta) error {
switch d.Action {
case graph.Add:
if qs.checkValid(key) {
return graph.ErrQuadExists
if *graph.NoErrorDup {
continue
}else{
return graph.ErrQuadExists
}
}
case graph.Delete:
if !qs.checkValid(key) {
return graph.ErrQuadNotExist
if *graph.NoErrorDel {
continue
}else{
return graph.ErrQuadNotExist
}
}
}
}