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

Draft implementation for multipleOperations #30

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

white-gecko
Copy link
Contributor

@white-gecko white-gecko commented Jul 26, 2024

In SPARQL 1.1 Update: 3 SPARQL 1.1 Update Language

A request is a sequence of operations and is terminated by EOF (End of File). Multiple operations are separated by a ';' (semicolon) character. A semicolon after the last operation in a request is optional. Implementations MUST ensure that the operations of a single request are executed in a fashion that guarantees the same effects as executing them sequentially in the order they appear in the request.

I did not yet fully understand the interface, so this is just a placeholder.

The idea is to simplify:

const updates = []

updates.push(sparql.deleteData(deleteArray).toString())
updates.push(sparql.insertData(insertArray).toString())

const updateString = updates.join(";")

or maybe even:

const updates = []

if (deleteArray && deleteArray.length > 0) {
  updates.push(sparql.deleteData(deleteArray).toString())
}
if (insertArray && insertArray.length > 0) {
  updates.push(sparql.insertData(insertArray).toString())
}

const updateString = updates.join(";")

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

Successfully merging this pull request may close these issues.

1 participant