Skip to content

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(";")

@bergos bergos self-requested a review December 9, 2024 22:07
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