Skip to content

Commit

Permalink
remove more tosourceid
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesamcl committed Oct 20, 2024
1 parent 3b8bbec commit df7a0b1
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 14 deletions.
7 changes: 1 addition & 6 deletions 06_prepare_db_import/grebi_make_neo_csv/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ fn main() -> std::io::Result<()> {
nodes_writer.write_all("\n".as_bytes()).unwrap();


edges_writer.write_all(":START_ID,:TYPE,:END_ID,edge_id:string,grebi:datasources:string[],grebi:subgraph:string,grebi:fromSourceIds:string[],grebi:toSourceId:string".as_bytes()).unwrap();
edges_writer.write_all(":START_ID,:TYPE,:END_ID,edge_id:string,grebi:datasources:string[],grebi:subgraph:string,grebi:fromSourceIds:string[]".as_bytes()).unwrap();
for prop in &all_edge_props {
edges_writer.write_all(b",").unwrap();
edges_writer.write_all(prop.as_bytes()).unwrap();
Expand Down Expand Up @@ -319,11 +319,6 @@ fn write_edge(src_line:&[u8], edge:SlicedEdge, all_edge_props:&HashSet<String>,
});
edges_writer.write_all(b"\"").unwrap();

// grebi:toSourceId
edges_writer.write_all(b",\"").unwrap();
edges_writer.write_all(edge.to_source_id).unwrap();
edges_writer.write_all(b"\"").unwrap();

for header_prop in all_edge_props {
edges_writer.write_all(b",").unwrap();
edges_writer.write_all(b"\"").unwrap();
Expand Down
1 change: 0 additions & 1 deletion 06_prepare_db_import/grebi_make_solr/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ fn write_solr_object(line:&Vec<u8>, nodes_writer:&mut BufWriter<&File>) {
k.eq("grebi:fromNodeId") ||
k.eq("grebi:toNodeId") ||
k.eq("grebi:fromSourceId") ||
k.eq("grebi:toSourceId") ||
k.eq("grebi:subgraph") ||
k.eq("grebi:sourceIds") ||
k.eq("grebi:displayType") ||
Expand Down
7 changes: 0 additions & 7 deletions grebi_shared/src/slice_materialised_edge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ pub struct SlicedEdge<'a> {
pub from_node_id:&'a [u8],
pub from_source_ids:Vec<&'a [u8]>,
pub to_node_id:&'a [u8],
pub to_source_id:&'a [u8],
pub datasources:Vec<&'a [u8]>,
pub props:Vec<SlicedProperty<'a>>,
pub _refs:Option<&'a [u8]>
Expand Down Expand Up @@ -65,11 +64,6 @@ impl<'a> SlicedEdge<'a> {
if k_to_nid != "grebi:toNodeId".as_bytes() { panic!("expected to as key, got {}", String::from_utf8( k_to_nid.to_vec() ).unwrap()); }
let to_nid = parser.string();

// "toSourceId": ...
let k_to_sid = parser.name();
if k_to_sid != "grebi:toSourceId".as_bytes() { panic!("expected to as key, got {}", String::from_utf8( k_to_sid.to_vec() ).unwrap()); }
let to_sid = parser.string();

// "grebi:datasources": ...
let k_value_datasources = parser.name();
if k_value_datasources != "grebi:datasources".as_bytes() { panic!(); }
Expand Down Expand Up @@ -115,7 +109,6 @@ impl<'a> SlicedEdge<'a> {
from_node_id: from_nid,
from_source_ids: from_sids,
to_node_id: to_nid,
to_source_id: to_sid,
datasources: entity_datasources,
props,
_refs
Expand Down

0 comments on commit df7a0b1

Please sign in to comment.