zoukankan      html  css  js  c++  java
  • CALL apoc.cypher.doIt创建动态节点的时候怎么指定多个标签?

    下面的创建节点实例,请教一下CALL apoc.cypher.doIt如何创建多个标签?现在的方式是只能指定一个标签!

    UNWIND 
    [{name:"sdasdsad234fdgsasdfas33",properties:{born:1978},labels:"ables213"},{name:"ssds12ad23489gsasdfas33",properties:{born:1978,sex:"男性",age:22},labels:"label31"}] AS row
    CALL apoc.cypher.doIt('MERGE (n:`' + row.labels + '` {name: {name}}) SET n += {properties}', {properties: row.properties, name: row.name}) YIELD value
    RETURN 1

    解决方案一:

    写在set里面,set n += {properties},n:human

    解决方案讨论:

    @zhoujieren64 用参数的形式传递怎么写呢? 例如这个会报错:

    UNWIND 
    [{name:"sdasdsad234fdgsasdfas33",properties:{born:1978},labels:"ables213",labelTest:"test"},{name:"ssds12ad23489gsasdfas33",properties:{born:1978,sex:"男性",age:22},labels:"label31",labelTest:"test"}] AS row
    CALL apoc.cypher.doIt('MERGE (n:`' + row.labels + '` {name: {name}}) SET n += {properties},n:{labelTest}', {properties: row.properties, name: row.name,labelTest:row.labelTest}) YIELD value
    RETURN 1
    原文地址:http://neo4j.com.cn/topic/5c4e7ea5cd4dafa110f1c6f1
  • 相关阅读:
    SQL Server 全文搜索 配置、查询初体验
    SQL Server 触发器
    SQL Server 锁
    SQL Server 事务语法
    SQL Server 表变量和临时表的区别
    SQL Server系统存储过程
    SQL 语句转换格式函数Cast、Convert
    SQL Server 系统视图
    T-SQL 批处理
    SQL Server 分区表
  • 原文地址:https://www.cnblogs.com/jpfss/p/11719434.html
Copyright © 2011-2022 走看看