Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
261 views
in Technique[技术] by (71.8m points)

Pass the parameter to cypher

Good day. I want to wrap the query below in a function with a parameter.

match p=((p1:p1)-[l]-(p2:p1))
  where (p1.id in [269618,387956,390435,1178574,263256])
    and (p2.id in [269618,387956,390435,1178574,263256])
  return
    upper(type(l)) as Type
    ,case when id(startNode(l))=id(p1) then 'DOWN' else 'UP' end as Relation_Vector
    ,p2.Short_Name as Visible_Name
    ,l.Shares
  ;

Примерно так:

CREATE OR REPLACE FUNCTION f (IN text) <-- 269618,387956,390435,1178574,263256
  RETURNS TABLE (...)
  LANGUAGE 'sql'
AS $BODY$
 -- text up
$BODY$;

How can I pass a list of vertex IDs to the function? Thank you in advance for your answer.

question from:https://stackoverflow.com/questions/65914866/pass-the-parameter-to-cypher

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...