Skip to content

Commit

Permalink
Updated srdfsparql to use ReaderQueryResultsParserOutput instead of F…
Browse files Browse the repository at this point in the history
…romReadQueryResultsReader
  • Loading branch information
labra committed Sep 17, 2024
1 parent a8c7ada commit 99663ab
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion srdf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ oxrdf = { workspace = true, features = [ "oxsdatatypes"] }
oxrdfxml = "0.1.0-rc.1"
oxiri = "0.2.3-alpha.1"
oxsdatatypes = "0.2.0-alpha.2"
sparesults = { version = "0.2.0-alpha.5" }
sparesults = { version = "0.2.0-rc.2" }
tokio = { version = "1.38", features = ["full"] }
colored = "2"
reqwest = { version = "0.12", features = ["blocking", "json"] }
Expand Down
14 changes: 7 additions & 7 deletions srdf/src/srdf_sparql/srdfsparql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use reqwest::{
Url,
};
use sparesults::{
FromReadQueryResultsReader, QueryResultsFormat, QueryResultsParser, QuerySolution,
QueryResultsFormat, QueryResultsParser, QuerySolution, ReaderQueryResultsParserOutput,
};
use std::rc::Rc;
use std::{
Expand Down Expand Up @@ -442,8 +442,8 @@ fn make_sparql_query(
let body = client.get(url).send()?.text()?;
let mut results = Vec::new();
let json_parser = QueryResultsParser::from_format(QueryResultsFormat::Json);
if let FromReadQueryResultsReader::Solutions(solutions) =
json_parser.parse_read(body.as_bytes())?
if let ReaderQueryResultsParserOutput::Solutions(solutions) =
json_parser.for_reader(body.as_bytes())?
{
for solution in solutions {
let sol = solution?;
Expand Down Expand Up @@ -484,8 +484,8 @@ fn outgoing_neighs(
let body = client.get(url).send()?.text()?;
let mut results: HashMap<OxNamedNode, HashSet<OxTerm>> = HashMap::new();
let json_parser = QueryResultsParser::from_format(QueryResultsFormat::Json);
if let FromReadQueryResultsReader::Solutions(solutions) =
json_parser.parse_read(body.as_bytes())?
if let ReaderQueryResultsParserOutput::Solutions(solutions) =
json_parser.for_reader(body.as_bytes())?
{
for solution in solutions {
let sol = solution?;
Expand Down Expand Up @@ -566,8 +566,8 @@ fn incoming_neighs(
let body = client.get(url).send()?.text()?;
let mut results: HashMap<OxNamedNode, HashSet<OxSubject>> = HashMap::new();
let json_parser = QueryResultsParser::from_format(QueryResultsFormat::Json);
if let FromReadQueryResultsReader::Solutions(solutions) =
json_parser.parse_read(body.as_bytes())?
if let ReaderQueryResultsParserOutput::Solutions(solutions) =
json_parser.for_reader(body.as_bytes())?
{
for solution in solutions {
let sol = solution?;
Expand Down

0 comments on commit 99663ab

Please sign in to comment.