美文网首页
Nosql-neo4j-Cypher 语句 概要

Nosql-neo4j-Cypher 语句 概要

作者: Viterbi | 来源:发表于2022-09-15 22:51 被阅读0次

    目录: [TOC]

    概要

    读子句Reading clauses

    Clause Description
    MATCH Specify the patterns to search for in the database.
    OPTIONAL MATCH Specify the patterns to search for in the database while using nulls for missing parts of the pattern.

    投影子句Projecting clauses

    Clause Description
    RETURN … [AS] Defines what to include in the query result set.
    WITH … [AS] Allows query parts to be chained together, piping the results from one to be used as starting points or criteria in the next.
    UNWIND … [AS] Expands a list into a sequence of rows.

    读子句Reading sub-clauses

    Sub-clause Description
    WHERE Adds constraints to the patterns in a MATCH or OPTIONAL MATCH clause or filters the results of a WITH clause.
    WHERE EXISTS {…} An existential sub-query used to filter the results of a MATCH, OPTIONAL MATCH or WITH clause.
    ORDER BY [ASC[ENDING] DESC[ENDING]] A sub-clause following RETURN or WITH, specifying that the output should be sorted in either ascending (the default) or descending order.
    SKIP Defines from which row to start including the rows in the output.
    LIMIT Constrains the number of rows in the output.

    读暗示Reading hints

    Hint Description
    USING INDEX Index hints are used to specify which index, if any, the planner should use as a starting point.
    USING INDEX SEEK Index seek hint instructs the planner to use an index seek for this clause.
    USING SCAN Scan hints are used to force the planner to do a label scan (followed by a filtering operation) instead of using an index.
    USING JOIN Join hints are used to enforce a join operation at specified points.

    写子句Writing clauses

    Clause Description
    CREATE Create nodes and relationships.
    DELETE Delete nodes, relationships or paths. Any node to be deleted must also have all associated relationships explicitly deleted.
    DETACH DELETE Delete a node or set of nodes. All associated relationships will automatically be deleted.
    SET Update labels on nodes and properties on nodes and relationships.
    REMOVE Remove properties and labels from nodes and relationships.
    FOREACH Update data within a list, whether components of a path, or the result of aggregation.

    读写子句Reading/Writing clauses

    Clause Description
    MERGE Ensures that a pattern exists in the graph. Either the pattern already exists, or it needs to be created.
    — ON CREATE Used in conjunction with MERGE, this write sub-clause specifies the actions to take if the pattern needs to be created.
    — ON MATCH Used in conjunction with MERGE, this write sub-clause specifies the actions to take if the pattern already exists.
    CALL […YIELD] Invokes a procedure deployed in the database and return any results.

    集合操作

    子查询语句

    多个graph

    导入数据

    管理员语句

    本文使用 文章同步助手 同步

    相关文章

      网友评论

          本文标题:Nosql-neo4j-Cypher 语句 概要

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