-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
@meistermeier and I doing team-sdn-ogm things, adding the `FINISH` clause. Co-authored-by: Gerrit Meier <[email protected]>
- Loading branch information
1 parent
4ff3dd5
commit 11a480c
Showing
10 changed files
with
239 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
neo4j-cypher-dsl/src/main/java/org/neo4j/cypherdsl/core/ExposesFinish.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Copyright (c) 2019-2024 "Neo4j," | ||
* Neo4j Sweden AB [https://neo4j.com] | ||
* | ||
* This file is part of Neo4j. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.neo4j.cypherdsl.core; | ||
|
||
import static org.apiguardian.api.API.Status.STABLE; | ||
|
||
import org.apiguardian.api.API; | ||
import org.jetbrains.annotations.NotNull; | ||
import org.neo4j.cypherdsl.core.annotations.CheckReturnValue; | ||
|
||
/** | ||
* A step to finish the query without the need to return anything. | ||
* | ||
* @author Gerrit Meier | ||
*/ | ||
@API(status = STABLE, since = "2024.4.0") | ||
public interface ExposesFinish { | ||
|
||
@NotNull @CheckReturnValue | ||
StatementBuilder.Terminal finish(); | ||
|
||
} |
49 changes: 49 additions & 0 deletions
49
neo4j-cypher-dsl/src/main/java/org/neo4j/cypherdsl/core/Finish.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* Copyright (c) 2019-2024 "Neo4j," | ||
* Neo4j Sweden AB [https://neo4j.com] | ||
* | ||
* This file is part of Neo4j. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.neo4j.cypherdsl.core; | ||
|
||
import static org.apiguardian.api.API.Status.STABLE; | ||
|
||
import org.apiguardian.api.API; | ||
import org.neo4j.cypherdsl.core.ast.Visitor; | ||
|
||
/** | ||
* @author Gerrit Meier | ||
* @author Michael J. Simons | ||
*/ | ||
@API(status = STABLE, since = "2024.4.0") | ||
public final class Finish implements Clause { | ||
|
||
private static final Expression FINISH_EXPRESSION = new RawLiteral.RawElement("FINISH"); | ||
|
||
private Finish() { | ||
|
||
} | ||
|
||
public static Finish create() { | ||
return new Finish(); | ||
} | ||
|
||
@Override | ||
public void accept(Visitor visitor) { | ||
visitor.enter(this); | ||
FINISH_EXPRESSION.accept(visitor); | ||
visitor.leave(this); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.