javascript - 如何通过 Javascript 访问 Neo4j 数据集?

标签 javascript neo4j cypher

我想知道如何通过 Javascript 访问我在 Neo4j 上的(示例)数据集,即我有一个电影数据集,所以我想通过本地 html 页面获取和接收查询?您可能想知道,我是这方面的初学者,如果有人能逐步向我解释,我将不胜感激 :)

提前致谢

最佳答案

您可以通过 http 事务端点访问您的 Neo4j 图形数据库

http://neo4j.com/docs/stable/rest-api-transactional.html

并发出密码查询以查询您的图表。

因为它是一个 http 端点,您可以使用普通的 ajax 请求访问它,例如用 jquery

var body = JSON.stringify({
                statements: [{
                    statement: 'MATCH (n) RETURN count(n)'
                }]
            });
$.ajax({
            url: "http://localhost:7474",
            type: "POST",
            data: body,
            contentType: "application/json"
        })
            .done(function(result){
                console.log(result);

            })
            .fail(function(error){
                console.log(error.statusText);
            });

关于javascript - 如何通过 Javascript 访问 Neo4j 数据集?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27213258/

相关文章:

neo4j - 是否可以通过使用 WHERE 子句而不是 FILTER 来改进 Neo4J Cypher 查询?

Neo4j Cypher 查询 : "Unknown identifier" when RETURN DISTINCT

javascript - ASP.NET MVC 5 : Make a select required based on the selected option of another select

neo4j - Neo4j Community 2.3.2 上的回滚/撤消?

javascript - 无法将范围分配给要操作的变量

neo4j - 如何使用py2neo批量添加标签

neo4j - 如何删除neo4j中的所有索引?

neo4j - 在密码中查询模板?如何避免重蹈覆辙

javascript - 如何在 jQuery 更改事件后获取更新的 URL 参数

javascript - 如何避免使用简单的 html 表单提交进行重定向?