whole dataset nuri

refactor
Niko PLP 3 days ago
parent dbb4e3d7ce
commit 86935837cd
  1. 5
      engine/verifier/src/orm/utils.rs

@ -53,6 +53,9 @@ pub fn group_by_subject_for_shape<'a>(
pub fn nuri_to_string(nuri: &NuriV0) -> String { pub fn nuri_to_string(nuri: &NuriV0) -> String {
// Get repo_id and overlay_id from the nuri // Get repo_id and overlay_id from the nuri
match nuri.target {
NuriTargetV0::UserSite => "did:ng:i".to_string(),
_ => {
let repo_id = nuri.target.repo_id(); let repo_id = nuri.target.repo_id();
let overlay_id = if let Some(overlay_link) = &nuri.overlay { let overlay_id = if let Some(overlay_link) = &nuri.overlay {
overlay_link.clone().try_into().unwrap() overlay_link.clone().try_into().unwrap()
@ -63,6 +66,8 @@ pub fn nuri_to_string(nuri: &NuriV0) -> String {
let graph_name = NuriV0::repo_graph_name(repo_id, &overlay_id); let graph_name = NuriV0::repo_graph_name(repo_id, &overlay_id);
graph_name graph_name
} }
}
}
pub fn escape_json_pointer(path_segment: &String) -> String { pub fn escape_json_pointer(path_segment: &String) -> String {
path_segment.replace("~", "~0").replace("/", "~1") path_segment.replace("~", "~0").replace("/", "~1")

Loading…
Cancel
Save