Skip to content

Commit

Permalink
feat(dataverse): align with new cognitarium api
Browse files Browse the repository at this point in the history
  • Loading branch information
amimart committed Aug 22, 2024
1 parent 0ccc86d commit ec13afa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
13 changes: 6 additions & 7 deletions contracts/axone-dataverse/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,8 @@ mod tests {
};
use crate::testutil::testutil::read_test_data;
use axone_cognitarium::msg::{
DataFormat, Head, Node, Results, SelectItem, SelectQuery, SelectResponse,
SimpleWhereCondition, TriplePattern, Value, VarOrNamedNode, VarOrNode, VarOrNodeOrLiteral,
WhereCondition, IRI,
DataFormat, Head, Node, Results, SelectItem, SelectQuery, SelectResponse, TriplePattern,
Value, VarOrNamedNode, VarOrNode, VarOrNodeOrLiteral, WhereClause, IRI,
};
use cosmwasm_std::testing::{message_info, mock_dependencies, mock_env};
use cosmwasm_std::{
Expand Down Expand Up @@ -304,15 +303,15 @@ mod tests {
prefixes: vec![],
limit: Some(1u32),
select: vec![SelectItem::Variable("p".to_string())],
r#where: vec![WhereCondition::Simple(
SimpleWhereCondition::TriplePattern(TriplePattern {
r#where: WhereClause::Bgp {
patterns: vec![TriplePattern {
subject: VarOrNode::Node(Node::NamedNode(IRI::Full(
"http://example.edu/credentials/3732".to_string(),
))),
predicate: VarOrNamedNode::Variable("p".to_string()),
object: VarOrNodeOrLiteral::Variable("o".to_string()),
})
)],
}]
},
}
})
);
Expand Down
12 changes: 6 additions & 6 deletions contracts/axone-dataverse/src/registrar/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ use crate::registrar::credential::DataverseCredential;
use crate::state::DATAVERSE;
use crate::ContractError;
use axone_cognitarium::msg::{
DataFormat, Node, SelectItem, SelectQuery, SimpleWhereCondition, TriplePattern, VarOrNamedNode,
VarOrNode, VarOrNodeOrLiteral, WhereCondition, IRI,
DataFormat, Node, SelectItem, SelectQuery, TriplePattern, VarOrNamedNode, VarOrNode,
VarOrNodeOrLiteral, WhereClause, IRI,
};
use axone_cognitarium_client::CognitariumClient;
use cosmwasm_std::{DepsMut, StdResult, Storage, WasmMsg};
Expand Down Expand Up @@ -36,15 +36,15 @@ impl ClaimRegistrar {
prefixes: vec![],
limit: Some(1u32),
select: vec![SelectItem::Variable("p".to_string())],
r#where: vec![WhereCondition::Simple(SimpleWhereCondition::TriplePattern(
TriplePattern {
r#where: WhereClause::Bgp {
patterns: vec![TriplePattern {
subject: VarOrNode::Node(Node::NamedNode(IRI::Full(
credential.id.to_string(),
))),
predicate: VarOrNamedNode::Variable("p".to_string()),
object: VarOrNodeOrLiteral::Variable("o".to_string()),
},
))],
}],
},
},
)?;

Expand Down

0 comments on commit ec13afa

Please sign in to comment.