数据类型可以分为三大类:

  • 数值类 Integer Float
  • 字符类:String
  • 布尔类:Boolean
  • 空间类 Point
  • 时间类 : Date , Time , LocalTime , DateTime , LocalDateTime Duration
  • 节点类:Node(包含 Id,Labels, Map类型 )
  • 关系类:Relationship(包含 Type, Map, Id类型)
  • 路径类:Path( 节点和关系的序列 )
  • 列表类:List
  • 字典类:Map [组成为(key, value)对,key是字符类型,value可以是属性类型,结构类型和组成类型。]

toBoolean()

toBooleanOrNull()

toBoolean() 函数 将字符串、整数或布尔值转换为布尔值。

RETURN toBoolean('true'), toBoolean('not a boolean'), toBoolean(0)

结果

toBoolean('true') toBoolean('not a boolean') toBoolean(0)

false

toBooleanOrNull() 函数将字符串、整数或布尔值转换为布尔值。 对于任何其他输入值,将返回 null。
RETURN toBooleanOrNull('true'), toBooleanOrNull('not a boolean'), toBooleanOrNull(0), toBooleanOrNull(1.5)

toBooleanOrNull('true')

toBooleanOrNull('not a boolean')

toBooleanOrNull(0)

toBooleanOrNull(1.5)

false

toFloat()

toFloatOrNull()

toFloat() 函数 将整数、浮点数或字符串值转换为浮点数。

RETURN toFloat('11.5'), toFloat('not a number')

结果

toFloat('11.5') toFloat('not a number') toFloatOrNull() 函数 将整数、浮点或字符串值转换为浮点数。 对于任何其他输入值,将返回 null。
RETURN toFloatOrNull('11.5'), toFloatOrNull('not a number'), toFloatOrNull(true)

结果

toFloatOrNull('11.5') toFloatOrNull('not a number') toFloatOrNull(true)

toInteger()

toIntegerOrNull()

函数 toInteger() 将布尔值、整数、浮点数或字符串值转换为整数值。

RETURN toInteger('42'), toInteger('not a number'), toInteger(true)

结果

toInteger('42') toInteger('not a number') toInteger(true)

toIntegerOrNull() 函数 将布尔值、整数、浮点数或字符串值转换为整数值。 对于任何其他输入值,将返回 null。

RETURN toIntegerOrNull('42'), toIntegerOrNull('not a number'), toIntegerOrNull(true), toIntegerOrNull(['A', 'B', 'C'])

结果

toIntegerOrNull('42') toIntegerOrNull('not a number') toIntegerOrNull(true) toIntegerOrNull(['A', 'B', 'C'])
目录 数据库 —— Neo4j Neo4j 的下载 Neo4j CQL命令 不积跬步,无以至千里;不积小流,无以成江海。要沉下心来,诗和远方的路费真的很贵! 数据库 —— Neo4j Neo4j 的下载 先在cmd界面 输入java -version命令判断是否存在Java JDK,不存在则先下载。 官网 下载 Neo4j 压缩包。(https:// neo4j .com/download-center/) ==注:==我下载的是3.5.30版本,Windows 系统下的。 将下载的压缩包解压 ,得到一个文件夹
我们现在处于“大 数据 时代”,而在浩繁的“大 数据 ,绝大多数是文本形式的非结构化 数据 其实可以非常灵活和有效的表示和处理文本内容 的词语、概念、依存关系,并用作知识推理、情感分析、智能问答等丰富的应用 。 本文以百度云的自然语言处理API服务为例,介绍怎样将文本分析的结果保存到 Neo4j 数据库 Neo4j 数据库 3.5.*。 APOC扩展包。关于如何安装APOC,请参见这里。我们要用到APOC 访问RESTful AP...
LOAD CSV WITH HEADERS FROM "file:///u--d.csv" AS line MERGE (d:dishes {ID: line.dishes_id}) MERGE (u:User {name: toInteger(line.user_id)}) CREATE (u)-[:rate {grade : toInteger(line.grade)}]->(d) 导入User实体 数据 和u–d关系 数据 时,u