Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions src/main/kotlin/org/openmbee/flexo/mms/routes/Model.kt
Original file line number Diff line number Diff line change
Expand Up @@ -285,22 +285,28 @@ fun AnyLayer1Context.genDiffUpdate(diffTriples: String="", conditions: Condition
}

# ... that isn't in the destination graph
filter not exists {
graph ?dstGraph {
?del_s ?del_p ?del_o .
}
MINUS {
{select * where {
hint:SubQuery hint:evaluationStrategy "BottomUp" .
graph ?dstGraph {
?del_s ?del_p ?del_o .
}
}}
}
} union {
# insert every triple from the destination graph...
graph ?dstGraph {
?ins_s ?ins_p ?ins_o .
}

# ... that isn't in the source graph
filter not exists {
graph ?srcGraph {
?ins_s ?ins_p ?ins_o .
}
# ... that isn't in the source graph
MINUS {
{select * where {
hint:SubQuery hint:evaluationStrategy "BottomUp" .
graph ?srcGraph {
?ins_s ?ins_p ?ins_o .
}
}}
}
} union {}
""")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ suspend fun GspLayer1Context<GspMutateResponse>.loadModel() {

// compute the delta
val updateString = genDiffUpdate()
val prefixesnew = prefixes.add("hint" to "http://aws.amazon.com/neptune/vocab/v01/QueryHints#")
executeSparqlUpdate(updateString) {
prefixes(prefixes)
prefixes(prefixesnew)

iri(
// use current branch as ref source
Expand Down