这是我的密码查询
MATCH (notification:Notification)-[:CREATED_BY]->(user:User)
MATCH (notification)-[:NOTIFICATION_COUNTRY]->(country:Country)
WHERE notification.status='PENDING' AND notification.type='SIMPLE'
RETURN collect({id:id(notification),message:notification.message,updated:notification.lastUpdatedDate,edited:user.username,country:country.name}) as notifications
LIMIT 25
我想通知SKIP,LIMIT。但是,我在这里收到通知的集合,所以我如何使用SKIP收集,还有其他方法吗?
答案 0 :(得分:4)
您可以将SKIP
和LIMIT
与WITH
一起使用,从而在创建收藏集之前限制通知:
MATCH (notification:Notification)-[:CREATED_BY]->(user:User)
MATCH (notification)-[:NOTIFICATION_COUNTRY]->(country:Country)
WHERE notification.status='PENDING' AND notification.type='SIMPLE'
WITH notification
SKIP 10
LIMIT 20
RETURN collect({id:id(notification),message:notification.message,updated:notification.lastUpdatedDate,edited:user.username,country:country.name}) as notifications