Skip to content

Commit

Permalink
build(deps): Bump neo4j.version from 5.16.0 to 5.17.0 (#933)
Browse files Browse the repository at this point in the history
* build(deps): Bump neo4j.version from 5.16.0 to 5.17.0

Bumps `neo4j.version` from 5.16.0 to 5.17.0.

Updates `org.neo4j:neo4j-cypher-javacc-parser` from 5.16.0 to 5.17.0
- [Release notes](https://github.com/neo4j/neo4j/releases)
- [Commits](neo4j/neo4j@5.16.0...5.17.0)

Updates `org.neo4j.test:neo4j-harness` from 5.16.0 to 5.17.0
- [Release notes](https://github.com/neo4j/neo4j/releases)
- [Commits](neo4j/neo4j@5.16.0...5.17.0)

---
updated-dependencies:
- dependency-name: org.neo4j:neo4j-cypher-javacc-parser
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.neo4j.test:neo4j-harness
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Adapt to latest parser changes.

* Polish.

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Michael Simons <[email protected]>
  • Loading branch information
dependabot[bot] and michael-simons authored Feb 26, 2024
1 parent 0d981a8 commit 5309701
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
import org.neo4j.cypher.internal.ast.factory.HintIndexType;
import org.neo4j.cypher.internal.ast.factory.ParameterType;
import org.neo4j.cypher.internal.ast.factory.ParserCypherTypeName;
import org.neo4j.cypher.internal.ast.factory.ParserNormalForm;
import org.neo4j.cypher.internal.ast.factory.ScopeType;
import org.neo4j.cypher.internal.ast.factory.ShowCommandFilterTypes;
import org.neo4j.cypher.internal.ast.factory.SimpleEither;
Expand Down Expand Up @@ -93,6 +94,7 @@
*/
@API(status = INTERNAL, since = "2021.3.0")
final class CypherDslASTFactory implements ASTFactory<
Statements,
Statement,
Statement,
Clause,
Expand Down Expand Up @@ -277,6 +279,11 @@ private static SymbolicName assertSymbolicName(@Nullable Expression v) {
return (SymbolicName) v;
}

@Override
public Statements statements(List<Statement> statements) {
return new Statements(statements);
}

@Override
public Statement newSingleQuery(InputPosition p, List<Clause> clauses) {
return newSingleQuery(clauses);
Expand Down Expand Up @@ -883,7 +890,8 @@ public Statement alterUser(InputPosition p, boolean ifExists, SimpleEither<Strin
throw new UnsupportedOperationException();
}

@Override public Expression passwordExpression(InputPosition p, String password) {
@Override
public Expression passwordExpression(InputPosition s, InputPosition e, String password) {
throw new UnsupportedOperationException();
}

Expand Down Expand Up @@ -1086,7 +1094,7 @@ public Expression newDecimalInteger(InputPosition p, String image, boolean negat
}

@Override
public Expression newString(InputPosition p, String image) {
public Expression newString(InputPosition start, InputPosition end, String image) {
return applyCallbacksFor(ExpressionCreatedEventType.ON_NEW_LITERAL, Cypher.literalOf(image));
}

Expand Down Expand Up @@ -1350,6 +1358,16 @@ public Expression isNotTyped(InputPosition p, Expression e, ParserCypherTypeName
throw new UnsupportedOperationException();
}

@Override
public Expression isNormalized(InputPosition p, Expression e, ParserNormalForm normalForm) {
throw new UnsupportedOperationException();
}

@Override
public Expression isNotNormalized(InputPosition p, Expression e, ParserNormalForm normalForm) {
throw new UnsupportedOperationException();
}

@Override
public Expression listLookup(Expression list, Expression index) {
return Cypher.valueAt(list, index);
Expand Down Expand Up @@ -1461,6 +1479,11 @@ public Expression singleExpression(InputPosition p, Expression v, Expression lis
return Cypher.single(assertSymbolicName(v)).in(list).where(where.asCondition());
}

@Override
public Expression normalizeExpression(InputPosition p, Expression i, ParserNormalForm normalForm) {
throw new UnsupportedOperationException();
}

@Override
public Expression patternExpression(InputPosition p, PatternElement patternElement) {

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* 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.parser;

import java.util.List;

import org.neo4j.cypherdsl.core.Statement;

record Statements(List<Statement> value) {
Statements {
value = value == null ? List.of() : List.copyOf(value);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class HandleNewMethods {
"labelWildcard", "subqueryInTransactionsBatchParameters", "subqueryInTransactionsErrorParameters", "subqueryInTransactionsReportParameters",
"showTransactionsClause", "terminateTransactionsClause", "turnYieldToWith", "alterDatabase", "settingQualifier", "showSettingsClause",
"anyPathSelector", "allPathSelector", "anyShortestPathSelector", "allShortestPathSelector", "shortestGroupsSelector", "repeatableElements", "differentRelationships",
"createConstraint", "showSupportedPrivileges", "isTyped", "isNotTyped", "functionUseClause"})
"createConstraint", "showSupportedPrivileges", "isTyped", "isNotTyped", "functionUseClause", "isNormalized", "isNotNormalized", "normalizeExpression"})
void newMethodsShouldNotBeSupportedOOTB(String methodName) {
var factory = CypherDslASTFactory.getInstance(null);
var methods = factory.getClass().getMethods();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* 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.parser;

import static org.assertj.core.api.Assertions.assertThat;

import java.util.ArrayList;

import org.junit.jupiter.api.Test;
import org.neo4j.cypherdsl.core.Cypher;
import org.neo4j.cypherdsl.core.Statement;

class StatementsTest {

@Test
void shouldSupportNullIst() {
var statements = new Statements(null);
assertThat(statements.value()).isEmpty();
}

@Test
void shouldCopy() {
var hlp = new ArrayList<Statement>();
hlp.add(Cypher.returning(Cypher.literalTrue()).build());
var statements = new Statements(hlp);
hlp.clear();
assertThat(statements.value()).hasSize(1);
}
}
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
<mockito.version>5.10.0</mockito.version>
<moditect-maven-plugin.version>1.1.0</moditect-maven-plugin.version>
<neo4j-java-driver.version>5.17.0</neo4j-java-driver.version>
<neo4j.version>5.16.0</neo4j.version>
<neo4j.version>5.17.0</neo4j.version>
<opencsv.version>5.9</opencsv.version>
<project.build.docs>${project.build.directory}/docs</project.build.docs>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down

0 comments on commit 5309701

Please sign in to comment.