美文网首页
[Neo4J] case Cypher查询语言(CQL) 语法参

[Neo4J] case Cypher查询语言(CQL) 语法参

作者: 爱上落入尘世间的你 | 来源:发表于2020-03-22 00:21 被阅读0次

case 表达式

类似于编程语言从常见的case表达式, 语法如下

match (n)
return
case n.age
when 1
then 111
when 2
then 222
else 333 // 缺省情况下的返回值
end
as result // 给case子句的返回值命名为result, 并返回

// 另一种形式的case子句
match (n)
return 
case
when n.age = 1
then 111
when n.name = 'a'
then 'aaa'
else 'ahah'
end
as result

相关文章

网友评论

      本文标题:[Neo4J] case Cypher查询语言(CQL) 语法参

      本文链接:https://www.haomeiwen.com/subject/venpyhtx.html