Added command line options to ignore duplicate quad in add or missing quad in delete
This commit is contained in:
parent
3c64b52e39
commit
ce1cce5a01
5 changed files with 50 additions and 8 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue