neo4j - Neo4j:Neo4j 中是否存在“不包含”?
问题描述
你知道 Neo4j 中是否存在“不包含”吗?
例如:
LOAD CSV WITH HEADERS FROM 'file:///animal.csv' as a fieldterminator "|"
match (b:Animals{animal:a.type})
where not a.type contains 'x' or not a.type contains 'abc'
set b.type=a.type
不幸的是,这样代码不起作用。
解决方案
请注意,包含区分大小写 我也会在比赛前移动 WHERE,那里更便宜
LOAD CSV WITH HEADERS FROM 'file:///animal.csv' as a fieldterminator "|"
WITH a where (not (a.type contains 'x')) or (not (a.type contains 'abc'))
match (b:Animals{animal:a.type})
set b.type=a.type
你还确定你想要一个 OR 而不是 AND 吗?
推荐阅读
- javascript - 如何正确地将模板从 HTML5 UP 导入 django
- xamarin - Azure 移动服务 UpdateAsync 给我 404 错误
- javascript - 通过 Android Webview 运行的服务工作者中的 Fetch() 请求立即失败
- c# - 部分代码在本地主机上运行正常,但在服务器(iis)上出错
- ios - Firebase Google 登录 (iOS) - 从未调用过 GIDSignInUIDelegate 方法
- r - 变异在自定义函数中的行为不符合预期
- javascript - 新创建的列表项并不总是通过 Socket IO 触发事件
- javascript - 在 Svelte 组件中未调用时触发的函数
- c# - 如何使用 MVVM ViewModel 根据 ListView SelectionChanged 事件更改视图中的内容
- javascript - 如何传递仅在回调创建时存在的参数