Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to remove quad #945

Closed
PaulB2Code opened this issue Nov 26, 2020 · 1 comment
Closed

Failed to remove quad #945

PaulB2Code opened this issue Nov 26, 2020 · 1 comment

Comments

@PaulB2Code
Copy link

We face an issue to remove a quad

printInfo(methodName, id, infos)

store, err := cayley.NewGraph("bolt", dbFile, nil)
if err != nil {
	printError(methodName, "NewGraph", err)
	return "", err
}
defer store.Close()

p := cayley.StartPath(store, quad.IRI(id)).Out(quad.IRI(infos.Field))
err = p.Iterate(nil).EachValue(nil, func(value quad.Value) {

	printInfo(methodName, value)

	t := cayley.NewTransaction()
	t.RemoveQuad(quad.Make(quad.IRI(id), quad.IRI(infos.Field), value, nil))
	err := store.ApplyTransaction(t)
	if err != nil {
		printError(methodName, "applyTrans removeQuad", err)
	}
})

2020/11/26 18:17:27 [INFO] - func : updateREPLACE :: [c4d5fe15-7b0a-4f14-af73-002eb853df50 { quantity 1}]
2020/11/26 18:17:27 [INFO] - func : updateREPLACE :: ["10"^^xsd:integer]
2020/11/26 18:17:27 xxxx[ERROR]xxxx - func : updateREPLACE :: [applyTrans removeQuad delete -- -> "10"^^xsd:integer: quad does not exist]

If we had a new one we arrive to remove it.

Do you have a clue ?

@PaulB2Code
Copy link
Author

We had to dumb manually. the database to solved the issue.

We copy all the lines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant