{"id":28387332,"url":"https://github.com/redisgraph/jredisgraph","last_synced_at":"2025-06-26T20:31:54.999Z","repository":{"id":21434579,"uuid":"92740357","full_name":"RedisGraph/JRedisGraph","owner":"RedisGraph","description":"Java API for RedisGraph","archived":false,"fork":false,"pushed_at":"2023-11-27T11:57:56.000Z","size":949,"stargazers_count":60,"open_issues_count":25,"forks_count":20,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-30T22:48:09.013Z","etag":null,"topics":["cypher","java-client","redis","redisgraph"],"latest_commit_sha":null,"homepage":"https://redisgraph.io","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RedisGraph.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-05-29T13:00:44.000Z","updated_at":"2025-04-02T09:48:22.000Z","dependencies_parsed_at":"2023-11-15T19:47:11.036Z","dependency_job_id":null,"html_url":"https://github.com/RedisGraph/JRedisGraph","commit_stats":null,"previous_names":["redislabs/jredisgraph"],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/RedisGraph/JRedisGraph","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedisGraph%2FJRedisGraph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedisGraph%2FJRedisGraph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedisGraph%2FJRedisGraph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedisGraph%2FJRedisGraph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RedisGraph","download_url":"https://codeload.github.com/RedisGraph/JRedisGraph/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedisGraph%2FJRedisGraph/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262139596,"owners_count":23265184,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cypher","java-client","redis","redisgraph"],"created_at":"2025-05-30T17:11:17.424Z","updated_at":"2025-06-26T20:31:54.980Z","avatar_url":"https://github.com/RedisGraph.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![license](https://img.shields.io/github/license/RedisGraph/JRedisGraph.svg)](https://github.com/RedisGraph/JRedisGraph/blob/master/LICENSE)\n[![GitHub issues](https://img.shields.io/github/release/RedisGraph/JRedisGraph.svg)](https://github.com/RedisGraph/JRedisGraph/releases/latest)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.redislabs/jredisgraph/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.redislabs/jredisgraph)\n[![Javadocs](https://www.javadoc.io/badge/com.redislabs/jredisgraph.svg)](https://www.javadoc.io/doc/com.redislabs/jredisgraph)\n[![Codecov](https://codecov.io/gh/RedisGraph/JRedisGraph/branch/master/graph/badge.svg)](https://codecov.io/gh/RedisGraph/JRedisGraph)\n[![Known Vulnerabilities](https://snyk.io/test/github/RedisGraph/JRedisGraph/badge.svg?targetFile=pom.xml)](https://snyk.io/test/github/RedisGraph/JRedisGraph?targetFile=pom.xml)\n\n# JRedisGraph\n[![Forum](https://img.shields.io/badge/Forum-RedisGraph-blue)](https://forum.redislabs.com/c/modules/redisgraph)\n[![Discord](https://img.shields.io/discord/697882427875393627?style=flat-square)](https://discord.gg/gWBRT6P)\n\nRedisGraph Java client\n\n## Deprecation notice\n\nAs of [Jedis](https://github.com/redis/jedis) version 4.2.0, this library is deprecated. Its features have been merged into Jedis. Please either install it from [maven](https://mvnrepository.com/artifact/redis.clients/jedis) or [the repo](https://github.com/redis/jedis).\n\n### Official Releases\n\n```xml\n  \u003cdependencies\u003e\n    \u003cdependency\u003e\n      \u003cgroupId\u003ecom.redislabs\u003c/groupId\u003e\n      \u003cartifactId\u003ejredisgraph\u003c/artifactId\u003e\n      \u003cversion\u003e2.5.1\u003c/version\u003e\n    \u003c/dependency\u003e\n  \u003c/dependencies\u003e\n```\n\n### Snapshots\n```xml\n  \u003crepositories\u003e\n    \u003crepository\u003e\n      \u003cid\u003esnapshots-repo\u003c/id\u003e\n      \u003curl\u003ehttps://oss.sonatype.org/content/repositories/snapshots\u003c/url\u003e\n    \u003c/repository\u003e\n  \u003c/repositories\u003e\n```\n\nand\n\n```xml\n  \u003cdependencies\u003e\n    \u003cdependency\u003e\n      \u003cgroupId\u003ecom.redislabs\u003c/groupId\u003e\n      \u003cartifactId\u003ejredisgraph\u003c/artifactId\u003e\n      \u003cversion\u003e2.6.0-SNAPSHOT\u003c/version\u003e\n    \u003c/dependency\u003e\n  \u003c/dependencies\u003e\n```\n\n## Example: Using the Java Client\n```java\npackage com.redislabs.redisgraph;\n\nimport com.redislabs.redisgraph.graph_entities.Edge;\nimport com.redislabs.redisgraph.graph_entities.Node;\nimport com.redislabs.redisgraph.graph_entities.Path;\nimport com.redislabs.redisgraph.impl.api.RedisGraph;\n\nimport java.util.List;\n\npublic class RedisGraphExample {\n    public static void main(String[] args) {\n        // general context api. Not bound to graph key or connection\n        RedisGraph graph = new RedisGraph();\n\n        Map\u003cString, Object\u003e params = new HashMap\u003c\u003e();\n        params.put(\"age\", 30);\n        params.put(\"name\", \"amit\");\n\n        // send queries to a specific graph called \"social\"\n        graph.query(\"social\",\"CREATE (:person{name:'roi',age:32})\");\n        graph.query(\"social\",\"CREATE (:person{name:$name,age:$age})\", params);\n        graph.query(\"social\",\"MATCH (a:person), (b:person) WHERE (a.name = 'roi' AND b.name='amit') CREATE (a)-[:knows]-\u003e(b)\");\n\n        ResultSet resultSet = graph.query(\"social\", \"MATCH (a:person)-[r:knows]-\u003e(b:person) RETURN a, r, b\");\n        while(resultSet.hasNext()) {\n            Record record = resultSet.next();\n            // get values\n            Node a = record.getValue(\"a\");\n            Edge r =  record.getValue(\"r\");\n\n            //print record\n            System.out.println(record.toString());\n        }\n\n        resultSet = graph.query(\"social\", \"MATCH p = (:person)-[:knows]-\u003e(:person) RETURN p\");\n        while(resultSet.hasNext()) {\n            Record record = resultSet.next();\n            Path p = record.getValue(\"p\");\n\n            // More path API at Javadoc.\n            System.out.println(p.nodeCount());\n        }\n\n        // delete graph\n        graph.deleteGraph(\"social\");\n\n        // get connection context - closable object\n        try(RedisGraphContext context = graph.getContext()) {\n            context.query(\"contextSocial\",\"CREATE (:person{name:'roi',age:32})\");\n            context.query(\"social\",\"CREATE (:person{name:$name,age:$age})\", params);\n            context.query(\"contextSocial\", \"MATCH (a:person), (b:person) WHERE (a.name = 'roi' AND b.name='amit') CREATE (a)-[:knows]-\u003e(b)\");\n            // WATCH/MULTI/EXEC\n            context.watch(\"contextSocial\");\n            RedisGraphTransaction t = context.multi();\n            t.query(\"contextSocial\", \"MATCH (a:person)-[r:knows]-\u003e(b:person{name:$name,age:$age}) RETURN a, r, b\", params);\n            // support for Redis/Jedis native commands in transaction\n            t.set(\"x\", \"1\");\n            t.get(\"x\");\n            // get multi/exec results\n            List\u003cObject\u003e execResults =  t.exec();\n            System.out.println(execResults.toString());\n\n            context.deleteGraph(\"contextSocial\");\n        }\n    }\n}\n\n```\n\n## License\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FRedisGraph%2FJRedisGraph.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2FRedisGraph%2FJRedisGraph?ref=badge_large)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredisgraph%2Fjredisgraph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredisgraph%2Fjredisgraph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredisgraph%2Fjredisgraph/lists"}