SPARQL: fixes "default union graph"

pull/190/head
Tpt 3 years ago
parent d0b8fe1a23
commit f70f0b1c16
  1. 13
      lib/src/sparql/dataset.rs
  2. 1
      server/src/main.rs

@ -96,7 +96,18 @@ impl DatasetView {
})) }))
} }
} else { } else {
Box::new(self.store_encoded_quads_for_pattern(subject, predicate, object, None)) Box::new(
self.store_encoded_quads_for_pattern(subject, predicate, object, None)
.map(|quad| {
let quad = quad?;
Ok(EncodedQuad::new(
quad.subject,
quad.predicate,
quad.object,
EncodedTerm::DefaultGraph,
))
}),
)
} }
} else if self } else if self
.dataset .dataset

@ -1218,6 +1218,7 @@ mod tests {
"s,p,o\r\nhttp://example.com,http://example.com,http://example.com", "s,p,o\r\nhttp://example.com,http://example.com,http://example.com",
); );
} }
#[test] #[test]
fn get_query_union_graph_in_url_and_urlencoded() { fn get_query_union_graph_in_url_and_urlencoded() {
let server = ServerTest::new(); let server = ServerTest::new();

Loading…
Cancel
Save