You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
https://neo4j.com/[Neo4J] is a highly scalable, native graph database designed to manage complex relationships in data. It enables developers to build applications that leverage the power of graph traversal, pattern matching, and high-performance querying using the **Cypher** query language.
1837
+
1838
+
This API provides support for **Graph** database operations, including entity persistence, query execution via Cypher, and relationship traversal.
1839
+
1840
+
=== How To Install
1841
+
1842
+
You can use either the Maven or Gradle dependencies:
1843
+
1844
+
[source,xml]
1845
+
----
1846
+
<dependency>
1847
+
<groupId>org.eclipse.jnosql.databases</groupId>
1848
+
<artifactId>jnosql-neo4j</artifactId>
1849
+
<version>1.1.4</version>
1850
+
</dependency>
1851
+
----
1852
+
1853
+
=== Configuration
1854
+
1855
+
This API provides the `Neo4JDatabaseConfigurations` class to programmatically establish the credentials. You can configure Neo4J properties using the https://microprofile.io/microprofile-config/[MicroProfile Config] specification.
1856
+
1857
+
[cols="2,4"]
1858
+
|===
1859
+
| Configuration Property | Description
1860
+
1861
+
| `jnosql.neo4j.uri` | The connection URI for the Neo4J database. Example: `bolt://localhost:7687`
1862
+
| `jnosql.neo4j.username` | The username for authentication.
1863
+
| `jnosql.neo4j.password` | The password for authentication.
1864
+
| `jnosql.neo4j.database` | The target database name.
1865
+
|===
1866
+
1867
+
==== Example Using MicroProfile Config
1868
+
1869
+
[source,properties]
1870
+
----
1871
+
jnosql.neo4j.uri=bolt://localhost:7687
1872
+
jnosql.neo4j.username=neo4j
1873
+
jnosql.neo4j.password=yourpassword
1874
+
jnosql.neo4j.database=neo4j
1875
+
----
1876
+
1877
+
=== Template API
1878
+
1879
+
The `Neo4JTemplate` interface extends `GraphTemplate` and allows for dynamic Cypher execution.
1880
+
1881
+
[source,java]
1882
+
----
1883
+
@Inject
1884
+
private Neo4JTemplate template;
1885
+
1886
+
List<Person> people = template.cypherQuery("MATCH (p:Person) WHERE p.name = $name RETURN p", params);
1887
+
var edge = template.edge(otavio, "FRIENDS_WITH", ada);
1888
+
----
1889
+
1890
+
=== Repository Support
1891
+
1892
+
The `Neo4JRepository` interface extends the `NoSQLRepository` interface and enables query execution using the `@Cypher` annotation.
0 commit comments