Merge pull request #319 from Quentin-M/patch-1
Fix NPE in SQL Quadstore
This commit is contained in:
commit
c5cea1f78b
1 changed files with 2 additions and 0 deletions
|
|
@ -216,10 +216,12 @@ func (qs *QuadStore) runTxPostgres(tx *sql.Tx, in []graph.Delta, opts graph.Igno
|
|||
d.Quad.Subject, d.Quad.Predicate, d.Quad.Object, d.Quad.Label)
|
||||
if err != nil {
|
||||
glog.Errorf("couldn't exec DELETE statement: %v", err)
|
||||
return err
|
||||
}
|
||||
affected, err := result.RowsAffected()
|
||||
if err != nil {
|
||||
glog.Errorf("couldn't get DELETE RowsAffected: %v", err)
|
||||
return err
|
||||
}
|
||||
if affected != 1 && !opts.IgnoreMissing {
|
||||
return errors.New("deleting non-existent triple; rolling back")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue