file40.hx 1.0 KB

12345678910111213141516171819
  1. QUERY get_professor_research_areas_with_descriptions_v1(professor_id: ID) =>
  2. research_areas <- N<Professor>(professor_id)::Out<HasResearchAreaAndDescriptionEmbedding>
  3. RETURN research_areas::{areas_and_descriptions}
  4. QUERY get_professor_research_areas_with_descriptions_v2(professor_id: ID) =>
  5. research_areas <- N<Professor>(professor_id)::Out<HasResearchAreaAndDescriptionEmbedding>::{areas_and_descriptions}
  6. RETURN research_areas::{areas_and_descriptions: areas_and_descriptions}
  7. QUERY get_professor_research_areas_with_descriptions(professor_id: ID) =>
  8. research_areas <- N<Professor>(professor_id)::Out<HasResearchAreaAndDescriptionEmbedding>::{areas_and_descriptions}
  9. RETURN research_areas
  10. QUERY get_professors_by_university_and_department_name(university_name: String, department_name: String) =>
  11. professors <- N<Professor>::WHERE(AND(
  12. EXISTS(_::Out<HasUniversity>::WHERE(_::{name}::EQ(university_name))),
  13. EXISTS(_::Out<HasDepartment>::WHERE(_::{name}::EQ(department_name)))
  14. ))
  15. RETURN professors