CQL代表Cypher查询语言。 像Oracle数据库具有查询语言SQL,Neo4j具有CQL作为查询语言。
Neo4j CQL -
它是Neo4j图形数据库的查询语言。
它是一种声明性模式匹配语言
它遵循SQL语法。
它的语法是非常简单且人性化、可读的格式。
常用的Neo4j CQL命令:
NO. | CQL命令 | 用法 |
---|---|---|
1 | CREATE 创建 | 创建节点,关系和属性 |
2 | MATCH 匹配 | 检索有关节点,关系和属性数据 |
3 | RETURN 返回 | 返回查询结果 |
4 | WHERE 哪里 | 提供条件过滤检索数据 |
5 | DELETE 删除 | 删除节点和关系 |
6 | REMOVE 移除 | 删除节点和关系的属性 |
7 | ORDER BY 以…排序 | 排序检索数据 |
8 | SET 组 | 添加或更新标签 |
Neo4j CQL 函数
NO. | 定制列表功能 | 用法 |
---|---|---|
1 | String字符串 | 它们用于使用String字面量 |
2 | Aggregation聚合 | 它们用于对CQL查询结果执行一些聚合操作。 |
3 | Relationship关系 | 他们用于获取关系的细节,如startnode,endnode等。 |
Neo4j CQL数据类型
NO. | CQL数据类型 | 用法 |
---|---|---|
1 | boolean | 用于表示布尔文字:true,false。 |
2 | byte | 用于表示8位整数 |
3 | short | 用于表示16位整数 |
4 | int | 用于表示32位整数 |
5 | long | 用于表示64位整数 |
6 | float | 用于表示32位浮点数 |
7 | double | 用于表示64位浮点数 |
8 | char | 用于表示16位字符 |
9 | char | 用于表示字符串 |
本文引用:https://www.w3cschool.cn/neo4/neo4j_cql_introduction.html