Changed the ApplyDeltas signature
This commit is contained in:
parent
50c3e5f93c
commit
472d86223e
8 changed files with 26 additions and 21 deletions
|
|
@ -100,18 +100,18 @@ func newQuadStore() *QuadStore {
|
|||
}
|
||||
}
|
||||
|
||||
func (qs *QuadStore) ApplyDeltas(deltas []graph.Delta, ignoreDupl, ignoreMiss bool) error {
|
||||
func (qs *QuadStore) ApplyDeltas(deltas []graph.Delta, ignoreOpts graph.IgnoreOpts) error {
|
||||
for _, d := range deltas {
|
||||
var err error
|
||||
switch d.Action {
|
||||
case graph.Add:
|
||||
err = qs.AddDelta(d)
|
||||
if err != nil && ignoreDupl{
|
||||
if err != nil && ignoreOpts.IgnoreDup{
|
||||
err = nil
|
||||
}
|
||||
case graph.Delete:
|
||||
err = qs.RemoveDelta(d)
|
||||
if err != nil && ignoreMiss{
|
||||
if err != nil && ignoreOpts.IgnoreMissing{
|
||||
err = nil
|
||||
}
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue