Skip to content

Commit

Permalink
test rs w names
Browse files Browse the repository at this point in the history
  • Loading branch information
TanLeZhan committed Aug 1, 2024
1 parent f5a2d12 commit 30dfeb5
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions python-server/app/crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ def get_relationships_with_names(db: Session, subject: int = None, predicate: st
return 'No results found.'
return relationships_with_names




def get_graph(db: Session, id):
return db.scalar(select(models.Network_Graph.content).where(models.Network_Graph.id == id).limit(1))

Expand Down Expand Up @@ -174,6 +177,12 @@ def derive_rs_from_media(db:Session, stakeholder_id: int= None):

if __name__ == "__main__":
stakeholder_id = 592
with Session(media_engine) as s:
ls = derive_rs_from_media(s,stakeholder_id=592)
print(ls)
with Session(stakeholder_engine) as s:
# ls = derive_rs_from_media(s,stakeholder_id=592)
# print(ls)
a = get_relationships_with_names(s, subject=28235)
print(len(a))
print(a)

# print(get_relationships_with_names2(s, subject=592))

0 comments on commit 30dfeb5

Please sign in to comment.