Skip to content

Based on neo4j-driver , includes : gain data , library connect , library config, serialize data etc.

Notifications You must be signed in to change notification settings

hanyanjun/neo4j-data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

引入方式

支持 ES module

import neo4jData from "neo4j-data"

支持CJS

var neo4jData = require("neo4jData");

支持AMD

require(['neo4j-data'],function(neo4j-data){
   ...
   ...
   ...
})

支持link

<script src="https://unpkg.com/neo4j-data"></script>

使用实例


import neo4jData from "neo4j-data"


const neo4j = new neo4jData();
<!-- 初始化配置 -->
neo4j.config({
    url : '填入url',
    username : '填入用户名',
    password : '填入密码'
})
<!-- 运行match语句 -->
neo4j.runMatch(
      "需要执行的MATCH语句"
      )
     .then(result=>{
         <!-- 对结果进行处理  -->
         let info = neo4j.dataDetail(result.records);
         neo4j.close();
})

处理后数据结构

{
    
nodes: [{…}, {…}, {…}, {…}, {…}, {…}, {…}],
nodesMap: {239979: {…}, 263732: {…}, 441610: {…}, 458585: {…}, 459032: {…}, 481273: {…}, 482247: {…}},
relationships: [{…}, {…}, {…}, {…}, {…}, {…}, {…}],
relationshipsMap:  {239979: {…}, 263732: {…}, 441610: {…}, 458585: {…}, 459032: {…}, 481273: {…}, 482247: {…}},
}

About

Based on neo4j-driver , includes : gain data , library connect , library config, serialize data etc.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published