0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Cypher よく使うクエリ

Posted at

ne4jのクエリ言語であるCypher。
よく使うクエリをピックアップしました。

検索

全てのリレーションを検索する
MATCH ()-[r]-() RETURN r;

全てのリレーションとそのリレーションに繋がるノードを検索する
MATCH p=()-[]->() RETURN p

削除

全てのリレーションを削除する
MATCH (n) OPTIONAL MATCH (n)-[r]-() DELETE r;

Constraints

ユニーク制約を課す
CREATE CONSTRAINT ON ( paper:Paper ) ASSERT (paper.id) IS UNIQUE

設定した制約を確認
call db.constraints

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?