Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
149 commits
Select commit Hold shift + click to select a range
43ac5e5
chore: include neo4j module
otaviojava Jan 20, 2025
7ed1024
chore: create initial structure for neo4j
otaviojava Jan 20, 2025
a2d99d1
chore: remove antlr4 configuration to neo4j
otaviojava Jan 20, 2025
12e117b
chore: update maven driver
otaviojava Jan 20, 2025
bc21fcb
feat: remove mapping layer at neo4j
otaviojava Jan 20, 2025
491c75e
chore: remove sample code structure
otaviojava Jan 20, 2025
2210920
refactor: update package name to neo4j
otaviojava Jan 20, 2025
fcd4a98
feat: remove extra code using neo4j
otaviojava Jan 20, 2025
b1396ea
feat: create initial structure to neo4j
otaviojava Jan 20, 2025
aa7453b
feat: create neo4jconfigurations
otaviojava Jan 20, 2025
df1a89a
docs: update rebase
otaviojava Jan 20, 2025
ba7cfa8
docs: update documentation at neo4j
otaviojava Jan 20, 2025
1098377
feat: update neo4j configuration
otaviojava Jan 20, 2025
ac84745
docs: enhance neo4j at configurations
otaviojava Jan 20, 2025
f836223
feat: create neo4j configuration
otaviojava Jan 20, 2025
f8b010c
feat: create neo4jproperty
otaviojava Jan 20, 2025
40db188
feat: create neo4configuration
otaviojava Jan 20, 2025
8e6bb58
feat: enable database configuration
otaviojava Jan 20, 2025
5849c89
feat: update neo4j configuration
otaviojava Jan 20, 2025
d70d1f1
feat: create initial neo4propert structyre
otaviojava Jan 21, 2025
7971ff1
docs: create documentation to neo4jconfiguration
otaviojava Jan 21, 2025
6355019
feat: create initial structure to manager factory
otaviojava Jan 21, 2025
1b99f2b
feat: updaste configuration returning diver
otaviojava Jan 21, 2025
8dba6e3
feat: create initial structure for neo4jdatabase manager
otaviojava Jan 21, 2025
a1bfe99
feat: create header to neo4jdatabase manager factory
otaviojava Jan 21, 2025
7a5c956
feat: create and define neo4jconfiguration as statie method factory
otaviojava Jan 21, 2025
25d27a9
feat: create initial structure and the concept to neoj4 factory
otaviojava Jan 21, 2025
bce5be5
feat: include more logs at neo4jdatabase manager facatory
otaviojava Jan 21, 2025
30eab0e
feat: create initial structure for neo4jdatabase manager
otaviojava Jan 21, 2025
968290b
docs: create documentation for Neo4JDatabaseManagerFactory
otaviojava Jan 21, 2025
7c4fa78
docs: enhance documentation to neo4jdatabvase factory
otaviojava Jan 21, 2025
b73ccb0
feat: create initial structure for Neo4JDatabaseManager
otaviojava Jan 21, 2025
6ab2476
feat: create neo4jdatabase manager
otaviojava Feb 19, 2025
ee4c0ee
feat: create neo4j database manager
otaviojava Feb 19, 2025
085c12a
feat: rename Neo4Jdatabase to Default
otaviojava Feb 20, 2025
79d654d
feat: update Neo4jdatabase using the default interface
otaviojava Feb 20, 2025
145848a
docs: create javadoc for neo4j
otaviojava Feb 20, 2025
2489800
docs: include api note
otaviojava Feb 20, 2025
10f738b
chore: update neo4j on dependency
otaviojava Feb 27, 2025
e99ec59
chore: create database container
otaviojava Feb 27, 2025
6c652c0
feat: database container create
otaviojava Feb 27, 2025
7af1289
test: create structure databasemanager test
otaviojava Feb 27, 2025
7c4f6fc
test: create initial structure at neo4j
otaviojava Feb 27, 2025
8b63f77
fix: remove the user and password be mandatory
otaviojava Feb 27, 2025
d67df0b
feat: create neo4jdatabase manager factory to create automatically th…
otaviojava Feb 27, 2025
761117a
feat: defines neo4 database
otaviojava Feb 27, 2025
66d71e0
feat: update the insert on neo4j
otaviojava Feb 27, 2025
dc977f9
feat: update structure on the class
otaviojava Feb 27, 2025
38a123d
feat: implement on entity
otaviojava Feb 27, 2025
e8a01cf
feat: create count method
otaviojava Feb 28, 2025
84160a6
test: create insert should insert entities scenario
otaviojava Feb 28, 2025
50a03e0
test: create scenario to account
otaviojava Feb 28, 2025
2fa35b1
feat: implement update
otaviojava Feb 28, 2025
55cdee2
feat: implement neo4j database mamanger
otaviojava Feb 28, 2025
087b199
test: create update scenario
otaviojava Feb 28, 2025
65dc2c4
feat: implement update entities
otaviojava Feb 28, 2025
0e4b292
test: update entities scenarios
otaviojava Feb 28, 2025
61623d0
feat: update log with the database message
otaviojava Feb 28, 2025
62499ea
feat: enhance variable name at mongodb query conversor
otaviojava Feb 28, 2025
174108f
feat: create implementation on seqlec query
otaviojava Feb 28, 2025
62c253c
test: create id scenario
otaviojava Feb 28, 2025
33f2773
feat: implement the logic to find fields
otaviojava Feb 28, 2025
1163ded
test: create query by feilds
otaviojava Feb 28, 2025
bb09d45
feat: generate test to field
otaviojava Feb 28, 2025
90edc74
feat: update skip and limit order
otaviojava Feb 28, 2025
4cc1af5
feat: create test scenario to skip and limit
otaviojava Feb 28, 2025
0032a14
feat: update the order logic
otaviojava Feb 28, 2025
eb03b31
test: generate scenario to asc order
otaviojava Feb 28, 2025
ef51b1b
test: generate order desc
otaviojava Feb 28, 2025
82b58a5
test: update order desc
otaviojava Mar 1, 2025
032504d
test: create equals and not equals scenarions
otaviojava Mar 1, 2025
80dbb13
test: create lesser scenarion
otaviojava Mar 1, 2025
7e5a108
test: create like
otaviojava Mar 1, 2025
0b43a90
test: update test scenarion
otaviojava Mar 1, 2025
924c9bc
feat: implement delete query
otaviojava Mar 1, 2025
a76d27b
feat: implement neo4j
otaviojava Mar 1, 2025
8c1d7f6
feat: create neo4jbuilder structure
otaviojava Mar 1, 2025
14bc0e0
feat: update neo4 query builder
otaviojava Mar 1, 2025
bd4e410
test: create neo4j query builder scenarion
otaviojava Mar 1, 2025
56ce964
feat: create neo4j database with builder of cypher
otaviojava Mar 1, 2025
c2c5a64
feat: update neo4j test scenarion
otaviojava Mar 1, 2025
64868b5
test: create neo4j
otaviojava Mar 1, 2025
48d1b39
test: update scenarions to test
otaviojava Mar 1, 2025
dda1a92
feat: update neo4j support
otaviojava Mar 1, 2025
a38aae2
docs: update changelog
otaviojava Mar 1, 2025
69dfb2e
feat: create new resources to neo4j
otaviojava Mar 1, 2025
b091916
docs: enhance documentation to neo4j databse manager
otaviojava Mar 1, 2025
086355e
feat: create neo4j exception
otaviojava Mar 1, 2025
6803159
feat: create edge communication exception
otaviojava Mar 1, 2025
661e03b
docs: create edgae communication
otaviojava Mar 1, 2025
218c9c6
docs: generate documentation to Neo4j
otaviojava Mar 1, 2025
70415a1
feat: generate new method on neo4j database
otaviojava Mar 1, 2025
d412253
feat: generate query logs to all database operations
otaviojava Mar 1, 2025
74820fd
feat: update Neo4jdatabase with the new methods
otaviojava Mar 1, 2025
6ab7963
feat: create test scenario to neo4j
otaviojava Mar 1, 2025
eaa2969
feat: update query on neo4j
otaviojava Mar 1, 2025
ea6b86b
feat: update query to relationship
otaviojava Mar 1, 2025
d9e8f78
feat: update the query
otaviojava Mar 1, 2025
239ef92
feat: fix serliazation at neo4j
otaviojava Mar 1, 2025
602783b
feat: update
otaviojava Mar 1, 2025
0d51fa5
feat: fix serialization
otaviojava Mar 1, 2025
fc1d23e
fix order to query builder
otaviojava Mar 1, 2025
3b8b977
feat: enhance imports
otaviojava Mar 1, 2025
356825d
docs: create documentation to neo4j
otaviojava Mar 1, 2025
ef5ae8b
feat: create Neo4Template
otaviojava Mar 1, 2025
bd56fa7
docs: enhance documentaiton Neo4Jtemplate
otaviojava Mar 1, 2025
ed67bde
feat: start the implementation on neo4j
otaviojava Mar 1, 2025
7f02339
feat: create a logger neo4j template
otaviojava Mar 1, 2025
9d65ea8
feat: create Edge representation
otaviojava Mar 1, 2025
551dd8d
docs: enhance documentation at edge
otaviojava Mar 1, 2025
7f4ed53
feat: implement Neo4j template
otaviojava Mar 1, 2025
08f77d6
test: create initial neo4template test structure
otaviojava Mar 1, 2025
b561592
feat: include header to neo4 tempalte
otaviojava Mar 1, 2025
bfc4080
feat: create struture
otaviojava Mar 1, 2025
4c53643
test: create initial structure
otaviojava Mar 1, 2025
06364a4
test: create test scenarion on neo4 templat
otaviojava Mar 1, 2025
202acd5
feat: create test on neodj#
otaviojava Mar 1, 2025
e3dadc2
chore: organize pom.xml
otaviojava Mar 1, 2025
79b25e3
feat: create magazine record
otaviojava Mar 1, 2025
da3a07d
feat: create neo4jconfigurations
otaviojava Mar 1, 2025
f353648
feat: define neo4j test scenarions
otaviojava Mar 1, 2025
acfff74
feat: define configuration to neo4
otaviojava Mar 1, 2025
be2eecf
test: enahnce integration test
otaviojava Mar 1, 2025
ab394c5
test: fix integratin test
otaviojava Mar 1, 2025
327c355
feat: update Cypher neoej4
otaviojava Mar 1, 2025
015a3c4
feat: update header
otaviojava Mar 1, 2025
56ecd35
docs: generat documentatino to cypher annotation
otaviojava Mar 1, 2025
92b45cd
docs: enhance neo4j repository documentation
otaviojava Mar 1, 2025
01dce5a
feat: implement neo4j proxy repository
otaviojava Mar 1, 2025
e4ecb9a
feat: create new resource to neoj4
otaviojava Mar 1, 2025
65d848a
feat: neo4j repository
otaviojava Mar 1, 2025
0422ce1
feat: create neo4j extesions
otaviojava Mar 1, 2025
3a9244c
test: define music repository
otaviojava Mar 1, 2025
b1b4b1c
test: neo4j extesnsion
otaviojava Mar 1, 2025
8ee38da
test: rename neoj4 extension
otaviojava Mar 1, 2025
66cb135
test: generate new test on neo4j
otaviojava Mar 1, 2025
3c04ad5
feat: define integration test
otaviojava Mar 1, 2025
3035d45
feat: include header
otaviojava Mar 1, 2025
814e0e1
feat: enhance imports
otaviojava Mar 1, 2025
205e27b
test: update builder neo4j
otaviojava Mar 1, 2025
e5d8f1d
feat: fix neo4jquery builder
otaviojava Mar 1, 2025
7ae5386
docs: update documentation at javadoc
otaviojava Mar 1, 2025
1ba43a0
docs: update javdaoc
otaviojava Mar 1, 2025
ff0f883
feat: move documentation
otaviojava Mar 1, 2025
4faf993
feat: enhance documentation
otaviojava Mar 1, 2025
de64a20
feat: update javadoc
otaviojava Mar 1, 2025
a0ddf16
docs: update documentation on readme
otaviojava Mar 1, 2025
7aea52b
docs: update readme file
otaviojava Mar 1, 2025
55a0825
feat: remove tck reference
otaviojava Mar 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to https://semver.org/spec/v2.0.0.html[Semantic Version
=== Added

- Include TCK tests
- Include support to Neo4J

=== Changed

Expand Down
76 changes: 75 additions & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1830,8 +1830,82 @@ SolrTemplate template;
List<Person> people = template.solr("age:@age AND type:@type AND _entity:@entity", params);
----

== Neo4J

=== Graph (Apache Tinkerpop)
image::https://jnosql.github.io/img/logos/neo4j.png[Neo4J Project,align="center",width=25%,height=25%]
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.

This API provides support for **Graph** database operations, including entity persistence, query execution via Cypher, and relationship traversal.

=== How To Install

You can use either the Maven or Gradle dependencies:

[source,xml]
----
<dependency>
<groupId>org.eclipse.jnosql.databases</groupId>
<artifactId>jnosql-neo4j</artifactId>
<version>1.1.4</version>
</dependency>
----

=== Configuration

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.

[cols="2,4"]
|===
| Configuration Property | Description

| `jnosql.neo4j.uri` | The connection URI for the Neo4J database. Example: `bolt://localhost:7687`
| `jnosql.neo4j.username` | The username for authentication.
| `jnosql.neo4j.password` | The password for authentication.
| `jnosql.neo4j.database` | The target database name.
|===

==== Example Using MicroProfile Config

[source,properties]
----
jnosql.neo4j.uri=bolt://localhost:7687
jnosql.neo4j.username=neo4j
jnosql.neo4j.password=yourpassword
jnosql.neo4j.database=neo4j
----

=== Template API

The `Neo4JTemplate` interface extends `GraphTemplate` and allows for dynamic Cypher execution.

[source,java]
----
@Inject
private Neo4JTemplate template;

List<Person> people = template.cypherQuery("MATCH (p:Person) WHERE p.name = $name RETURN p", params);
var edge = template.edge(otavio, "FRIENDS_WITH", ada);
----

=== Repository Support

The `Neo4JRepository` interface extends the `NoSQLRepository` interface and enables query execution using the `@Cypher` annotation.

[source,java]
----
@Repository
interface PersonRepository extends Neo4JRepository<Person, String> {

@Cypher("MATCH (p:Person) RETURN p")
List<Person> findAll();

@Cypher("MATCH (p:Person) WHERE p.name = $name RETURN p")
List<Person> findByName(@Param("name") String name);
}
----


== Graph (Apache Tinkerpop)

Currently, the Jakarta NoSQL doesn't define an API for Graph database types but Eclipse JNoSQL provides a Graph template to explore the specific behavior of this NoSQL type.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ public static Bson convert(CriteriaCondition condition) {
}
case LIKE -> Filters.regex(document.name(), Pattern.compile(prepareRegexValue(value.toString())));
case AND -> {
List<CriteriaCondition> andList = condition.element().value().get(new TypeReference<>() {
List<CriteriaCondition> andConditions = condition.element().value().get(new TypeReference<>() {
});
yield Filters.and(andList.stream()
yield Filters.and(andConditions.stream()
.map(DocumentQueryConversor::convert).toList());
}
case OR -> {
List<CriteriaCondition> orList = condition.element().value().get(new TypeReference<>() {
List<CriteriaCondition> orConditions = condition.element().value().get(new TypeReference<>() {
});
yield Filters.or(orList.stream()
yield Filters.or(orConditions.stream()
.map(DocumentQueryConversor::convert).toList());
}
case BETWEEN -> {
Expand Down
56 changes: 56 additions & 0 deletions jnosql-neo4j/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2022 Contributors to the Eclipse Foundation
~ All rights reserved. This program and the accompanying materials
~ are made available under the terms of the Eclipse Public License v1.0
~ and Apache License v2.0 which accompanies this distribution.
~ The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
~ and the Apache License v2.0 is available at http://www.opensource.org/licenses/apache2.0.php.
~
~ You may elect to redistribute this code under either of these licenses.
~
~ Contributors:
~
~ Otavio Santana
-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.eclipse.jnosql.databases</groupId>
<artifactId>jnosql-databases-parent</artifactId>
<version>1.1.5-SNAPSHOT</version>
</parent>

<artifactId>jnosql-neo4j</artifactId>

<properties>
<neo4j.driver>5.27.0</neo4j.driver>
</properties>

<dependencies>
<dependency>
<groupId>org.neo4j.driver</groupId>
<artifactId>neo4j-java-driver</artifactId>
<version>${neo4j.driver}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>jnosql-database-commons</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jnosql.mapping</groupId>
<artifactId>jnosql-mapping-semistructured</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>neo4j</artifactId>
<version>${testcontainers.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

</project>
Loading