diff --git a/benchkit/src/main/resources/benchkit-spec.yml b/benchkit/src/main/resources/benchkit-spec.yml index 590fdc1e..bd5dedbe 100644 --- a/benchkit/src/main/resources/benchkit-spec.yml +++ b/benchkit/src/main/resources/benchkit-spec.yml @@ -119,6 +119,7 @@ paths: summary: Executes the given workload. description: |- Drivers should load all the records to memory and then discard. + operationId: executeWorkload responses: '204': description: Workload executed. diff --git a/neo4j-jdbc-it/mybatis-smoke-tests/src/main/resources/application.properties b/neo4j-jdbc-it/mybatis-smoke-tests/src/main/resources/application.properties index ac7bfeaa..51ae9ceb 100644 --- a/neo4j-jdbc-it/mybatis-smoke-tests/src/main/resources/application.properties +++ b/neo4j-jdbc-it/mybatis-smoke-tests/src/main/resources/application.properties @@ -20,3 +20,5 @@ # To enable logging for the JDBC driver use standard Spring Boot facilities # logging.level.org.neo4j.jdbc = TRACE # logging.level.org.neo4j.it.mybatis = DEBUG + +spring.main.banner-mode=off diff --git a/neo4j-jdbc-it/pom.xml b/neo4j-jdbc-it/pom.xml index cdef87f6..ebe805b4 100644 --- a/neo4j-jdbc-it/pom.xml +++ b/neo4j-jdbc-it/pom.xml @@ -96,6 +96,13 @@ + + org.apache.maven.plugins + maven-javadoc-plugin + + true + + diff --git a/neo4j-jdbc-it/quarkus-smoke-tests/src/main/java/org/neo4j/jdbc/it/quarkus/Movie.java b/neo4j-jdbc-it/quarkus-smoke-tests/src/main/java/org/neo4j/jdbc/it/quarkus/Movie.java index fca26e4a..b3abde4a 100644 --- a/neo4j-jdbc-it/quarkus-smoke-tests/src/main/java/org/neo4j/jdbc/it/quarkus/Movie.java +++ b/neo4j-jdbc-it/quarkus-smoke-tests/src/main/java/org/neo4j/jdbc/it/quarkus/Movie.java @@ -20,5 +20,11 @@ import org.jdbi.v3.core.mapper.reflect.ColumnName; +/** + * A movie with a title. + * + * @param title a title + * @author Michael J. Simons + */ public record Movie(@ColumnName("title") String title) { } diff --git a/neo4j-jdbc-it/quarkus-smoke-tests/src/main/java/org/neo4j/jdbc/it/quarkus/MovieResource.java b/neo4j-jdbc-it/quarkus-smoke-tests/src/main/java/org/neo4j/jdbc/it/quarkus/MovieResource.java index 310f47c8..4967afae 100644 --- a/neo4j-jdbc-it/quarkus-smoke-tests/src/main/java/org/neo4j/jdbc/it/quarkus/MovieResource.java +++ b/neo4j-jdbc-it/quarkus-smoke-tests/src/main/java/org/neo4j/jdbc/it/quarkus/MovieResource.java @@ -26,15 +26,28 @@ import jakarta.ws.rs.core.MediaType; import org.jdbi.v3.core.Jdbi; +/** + * Produces a list of movies. + * + * @author Michael J. Simons + */ @Path("/movies") public class MovieResource { private final Jdbi db; + /** + * Creates a new resource. + * @param db required for database access + */ public MovieResource(Jdbi db) { this.db = db; } + /** + * Mapped as GET method. + * @return a list of movies, empty but never null + */ @GET @Produces(MediaType.APPLICATION_JSON) public List get() { diff --git a/neo4j-jdbc-it/quarkus-smoke-tests/src/main/resources/application.properties b/neo4j-jdbc-it/quarkus-smoke-tests/src/main/resources/application.properties index 731296f2..6cba75e4 100644 --- a/neo4j-jdbc-it/quarkus-smoke-tests/src/main/resources/application.properties +++ b/neo4j-jdbc-it/quarkus-smoke-tests/src/main/resources/application.properties @@ -19,3 +19,5 @@ quarkus.datasource.db-kind=other quarkus.datasource.jdbc.driver=org.neo4j.jdbc.Neo4jDriver + +quarkus.banner.enabled=false diff --git a/neo4j-jdbc-it/spring-boot-smoke-tests/src/main/resources/application.properties b/neo4j-jdbc-it/spring-boot-smoke-tests/src/main/resources/application.properties index 5aa1e385..50a19571 100644 --- a/neo4j-jdbc-it/spring-boot-smoke-tests/src/main/resources/application.properties +++ b/neo4j-jdbc-it/spring-boot-smoke-tests/src/main/resources/application.properties @@ -19,3 +19,5 @@ # To enable logging for the JDBC driver use standard Spring Boot facilities # logging.level.org.neo4j.jdbc = TRACE + +spring.main.banner-mode=off diff --git a/neo4j-jdbc/src/main/java/module-info.java b/neo4j-jdbc/src/main/java/module-info.java index 9a3a580a..8f14bbba 100644 --- a/neo4j-jdbc/src/main/java/module-info.java +++ b/neo4j-jdbc/src/main/java/module-info.java @@ -16,6 +16,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +/** + * The Neo4j JDBC Driver exposes both the actual JDBC API and the Neo4j value system being used. The value system can be used with methods like {@link java.sql.ResultSet#getObject(int, Class)}, for retrieving Neo4j nodes, relationships, paths and especially, the original value objects. + */ @SuppressWarnings({"requires-automatic"}) // Netty is an automatic module :( module org.neo4j.jdbc { requires transitive java.sql; diff --git a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/DatabaseMetadataImpl.java b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/DatabaseMetadataImpl.java index c81034eb..bec56462 100644 --- a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/DatabaseMetadataImpl.java +++ b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/DatabaseMetadataImpl.java @@ -42,8 +42,6 @@ import org.neo4j.jdbc.internal.bolt.response.PullResponse; import org.neo4j.jdbc.internal.bolt.response.ResultSummary; import org.neo4j.jdbc.internal.bolt.response.RunResponse; -import org.neo4j.jdbc.internal.bolt.value.RecordImpl; -import org.neo4j.jdbc.values.Neo4jTypeToSqlTypeMapper; import org.neo4j.jdbc.values.Record; import org.neo4j.jdbc.values.Value; import org.neo4j.jdbc.values.Values; @@ -820,7 +818,7 @@ public ResultSet getSchemas() { @Override public List records() { var values = new Value[] { Values.value("public"), Values.value("") }; - return Collections.singletonList(new RecordImpl(keys, values)); + return Collections.singletonList(Record.of(keys, values)); } @Override @@ -863,7 +861,7 @@ public ResultSet getTableTypes() { @Override public List records() { var values = new Value[] { Values.value("TABLE") }; - return Collections.singletonList(new RecordImpl(keys, values)); + return Collections.singletonList(Record.of(keys, values)); } @Override @@ -975,7 +973,7 @@ public List records() { var records = new ArrayList(rows.size()); for (Value[] values : rows) { - records.add(new RecordImpl(keys, values)); + records.add(Record.of(keys, values)); } return records; diff --git a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/Neo4jDataSource.java b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/Neo4jDataSource.java index 5f0e7de3..74772bf0 100644 --- a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/Neo4jDataSource.java +++ b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/Neo4jDataSource.java @@ -84,6 +84,11 @@ public final class Neo4jDataSource implements Neo4jDataSourceExtensions { private final Properties connectionProperties = new Properties(); + /** + * Creates a new {@link DataSource} which is not yet usable without further + * configuration. This constructor is mainly used for tooling that loads data sources + * via reflection. + */ public Neo4jDataSource() { } diff --git a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/Neo4jDriver.java b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/Neo4jDriver.java index 220abfa7..ccea53e8 100644 --- a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/Neo4jDriver.java +++ b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/Neo4jDriver.java @@ -234,9 +234,13 @@ public static Optional fromEnv(Path directory, String filename) thro return new BuilderImpl(false, Map.of()).fromEnv(directory, filename); } + /** + * Creates a new instance of the {@link Neo4jDriver}. The instance is usable and is + * able to provide connections. The public constructor is provided mainly for tooling + * that directly accesses vendor specific classes and circumvents the service loader + * machinery for JDBC. + */ public Neo4jDriver() { - // Having a public default constructor is not only fine here, but also required on - // the module path so that this public class can be properly exported. this(BoltConnectionProviders.netty(eventLoopGroup, Clock.systemUTC())); } @@ -762,6 +766,10 @@ Map rawConfig() { } } + /** + * Configuration step for creating new {@link Neo4jDriver driver instances} in a + * fluent way. + */ public interface SpecifyEnvStep { /** diff --git a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/Neo4jTypeToSqlTypeMapper.java b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/Neo4jTypeToSqlTypeMapper.java similarity index 78% rename from neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/Neo4jTypeToSqlTypeMapper.java rename to neo4j-jdbc/src/main/java/org/neo4j/jdbc/Neo4jTypeToSqlTypeMapper.java index 723bff5b..790f7d4a 100644 --- a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/Neo4jTypeToSqlTypeMapper.java +++ b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/Neo4jTypeToSqlTypeMapper.java @@ -16,11 +16,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.neo4j.jdbc.values; +package org.neo4j.jdbc; import java.sql.Types; +import java.util.Locale; -public final class Neo4jTypeToSqlTypeMapper { +import org.neo4j.jdbc.values.Type; + +final class Neo4jTypeToSqlTypeMapper { private Neo4jTypeToSqlTypeMapper() { } @@ -30,8 +33,8 @@ private Neo4jTypeToSqlTypeMapper() { * db.schema.nodeTypeProperties() procedure In 6 this will change so will need to add * another method to handle the new types returned here when working with 6 */ - public static int toSqlTypeFromOldCypherType(String neo4jType) { - return toSqlType(Type.valueOfV5Name(neo4jType)); + static int toSqlTypeFromOldCypherType(String neo4jType) { + return toSqlType(valueOfV5Name(neo4jType)); } /* @@ -39,7 +42,7 @@ public static int toSqlTypeFromOldCypherType(String neo4jType) { * db.schema.nodeTypeProperties() procedure In 6 this will change so will need to add * another method to handle the new types returned here when working with 6 */ - public static String oldCypherTypesToNew(String neo4jType) { + static String oldCypherTypesToNew(String neo4jType) { return switch (neo4jType) { // Simple case "Boolean" -> "BOOLEAN"; @@ -66,7 +69,7 @@ public static String oldCypherTypesToNew(String neo4jType) { }; } - public static int toSqlType(Type neo4jType) { + static int toSqlType(Type neo4jType) { return switch (neo4jType) { case ANY, DURATION -> Types.OTHER; case BOOLEAN -> Types.BOOLEAN; @@ -84,4 +87,17 @@ public static int toSqlType(Type neo4jType) { }; } + static Type valueOfV5Name(String in) { + + var value = in.replaceAll("([A-Z]+)([A-Z][a-z])", "$1_$2") + .replaceAll("([a-z])([A-Z])", "$1_$2") + .toUpperCase(Locale.ROOT); + value = switch (value) { + case "LONG" -> Type.INTEGER.name(); + case "DOUBLE" -> Type.FLOAT.name(); + default -> value.endsWith("ARRAY") ? Type.LIST.name() : value; + }; + return Type.valueOf(value); + } + } diff --git a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/ResultSetMetaDataImpl.java b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/ResultSetMetaDataImpl.java index 63451fba..8e852e77 100644 --- a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/ResultSetMetaDataImpl.java +++ b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/ResultSetMetaDataImpl.java @@ -35,7 +35,6 @@ import org.neo4j.jdbc.values.LocalDateTimeValue; import org.neo4j.jdbc.values.LocalTimeValue; import org.neo4j.jdbc.values.MapValue; -import org.neo4j.jdbc.values.Neo4jTypeToSqlTypeMapper; import org.neo4j.jdbc.values.NodeValue; import org.neo4j.jdbc.values.NullValue; import org.neo4j.jdbc.values.PathValue; @@ -47,7 +46,7 @@ import org.neo4j.jdbc.values.Type; import org.neo4j.jdbc.values.Value; -public class ResultSetMetaDataImpl implements ResultSetMetaData { +final class ResultSetMetaDataImpl implements ResultSetMetaData { private final List keys; diff --git a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/internal/bolt/internal/handler/BasicPullResponseHandler.java b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/internal/bolt/internal/handler/BasicPullResponseHandler.java index b91c8807..a088ca35 100644 --- a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/internal/bolt/internal/handler/BasicPullResponseHandler.java +++ b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/internal/bolt/internal/handler/BasicPullResponseHandler.java @@ -30,7 +30,6 @@ import org.neo4j.jdbc.internal.bolt.response.PullResponse; import org.neo4j.jdbc.internal.bolt.response.ResultSummary; import org.neo4j.jdbc.internal.bolt.response.RunResponse; -import org.neo4j.jdbc.internal.bolt.value.RecordImpl; import org.neo4j.jdbc.values.BooleanValue; import org.neo4j.jdbc.values.Record; import org.neo4j.jdbc.values.Value; @@ -63,8 +62,7 @@ public void onFailure(Throwable error) { @Override public void onRecord(Value[] fields) { var runResponse = this.runStage.toCompletableFuture().join(); - var record = new RecordImpl(runResponse.keys(), fields); - this.records.add(record); + this.records.add(Record.of(runResponse.keys(), fields)); } private record InternalPullResponse(List records, ResultSummary summary) implements PullResponse { diff --git a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/internal/bolt/value/package-info.java b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/internal/bolt/value/package-info.java deleted file mode 100644 index 3926a247..00000000 --- a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/internal/bolt/value/package-info.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) 2023-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. - */ -/** - * Contains implementations of the Bolt value system, for internal use only, keep away. - */ -package org.neo4j.jdbc.internal.bolt.value; diff --git a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/AbstractMapAccessorWithDefaultValue.java b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/AbstractMapAccessorWithDefaultValue.java index 22df8fb1..6f9180ff 100644 --- a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/AbstractMapAccessorWithDefaultValue.java +++ b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/AbstractMapAccessorWithDefaultValue.java @@ -22,12 +22,7 @@ import java.util.Map; import java.util.function.Function; -public abstract class AbstractMapAccessorWithDefaultValue implements MapAccessorWithDefaultValue { - - public AbstractMapAccessorWithDefaultValue() { - } - - public abstract Value get(String key); +abstract class AbstractMapAccessorWithDefaultValue implements MapAccessorWithDefaultValue { @Override public Value get(String key, Value defaultValue) { @@ -267,10 +262,16 @@ private double get(Value value, double defaultValue) { } } - // formats map using ':' as key-value separator instead of default '=' - protected static String formatPairs(Map entries) { - var iterator = entries.entrySet().iterator(); - switch (entries.size()) { + /** + * Formats the content of a bolt map into a string reassembling the shape of a Cypher + * map, i.e. using {@code :} instead of {@code =} as the key-value separator. + * @param map the map to format + * @param the type of the maps values. + * @return a string representation of the map + */ + protected static String formatPairs(Map map) { + var iterator = map.entrySet().iterator(); + switch (map.size()) { case 0 -> { return "{}"; } diff --git a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/AbstractNumberValue.java b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/AbstractNumberValue.java index 013e7f69..6bfec7d6 100644 --- a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/AbstractNumberValue.java +++ b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/AbstractNumberValue.java @@ -18,10 +18,7 @@ */ package org.neo4j.jdbc.values; -public abstract class AbstractNumberValue extends AbstractValue { - - public AbstractNumberValue() { - } +abstract class AbstractNumberValue extends AbstractValue { @Override public final V asObject() { diff --git a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/AbstractObjectValue.java b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/AbstractObjectValue.java index c58d1820..b7a3f2e9 100644 --- a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/AbstractObjectValue.java +++ b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/AbstractObjectValue.java @@ -22,7 +22,7 @@ abstract class AbstractObjectValue extends AbstractValue { - protected final V adapted; + final V adapted; protected AbstractObjectValue(V adapted) { if (adapted == null) { diff --git a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/AsValue.java b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/AsValue.java index 8f4a9c30..24edd94a 100644 --- a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/AsValue.java +++ b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/AsValue.java @@ -18,6 +18,12 @@ */ package org.neo4j.jdbc.values; +/** + * Represents an object that might be usable as a {@link Value}. + * + * @author Neo4j Drivers Team + * @since 6.0.0 + */ public interface AsValue { /** diff --git a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/BooleanValue.java b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/BooleanValue.java index ee0819bb..c3d4e309 100644 --- a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/BooleanValue.java +++ b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/BooleanValue.java @@ -20,6 +20,12 @@ import java.util.Objects; +/** + * Representation of a boolean value inside the Neo4j type system. + * + * @author Neo4j Drivers Team + * @since 6.0.0 + */ public abstract sealed class BooleanValue extends AbstractValue { private BooleanValue() { @@ -36,10 +42,6 @@ private BooleanValue() { */ public static final BooleanValue FALSE = new FalseValue(); - public static BooleanValue fromBoolean(boolean value) { - return value ? TRUE : FALSE; - } - @Override public abstract Boolean asObject(); diff --git a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/BytesValue.java b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/BytesValue.java index 9b4e8f5c..039df371 100644 --- a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/BytesValue.java +++ b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/BytesValue.java @@ -21,6 +21,13 @@ import java.util.Arrays; import java.util.HexFormat; +/** + * Representing a byte-array. Note that in Cypher byte arrays cannot be directly used. + * They are however natively storable in Neo4j. + * + * @author Neo4j Drivers Team + * @since 6.0.0 + */ public final class BytesValue extends AbstractValue { private final byte[] val; diff --git a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/DateTimeValue.java b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/DateTimeValue.java index 62f8515f..97990f75 100644 --- a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/DateTimeValue.java +++ b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/DateTimeValue.java @@ -23,6 +23,12 @@ import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatterBuilder; +/** + * The Cypher type {@code ZONED DATETIME} maps to a Java {@link ZonedDateTime}. + * + * @author Neo4j Drivers Team + * @since 6.0.0 + */ public final class DateTimeValue extends AbstractObjectValue { private static final DateTimeFormatter FORMATTER = new DateTimeFormatterBuilder().appendLiteral("DATETIME '") diff --git a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/DateValue.java b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/DateValue.java index 120cba21..819d15fa 100644 --- a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/DateValue.java +++ b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/DateValue.java @@ -22,6 +22,12 @@ import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatterBuilder; +/** + * The Cypher type {@code DATE} maps to a Java {@link LocalDate}. + * + * @author Neo4j Drivers Team + * @since 6.0.0 + */ public final class DateValue extends AbstractObjectValue { private static final DateTimeFormatter FORMATTER = new DateTimeFormatterBuilder().appendLiteral("DATE '") diff --git a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/DurationValue.java b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/DurationValue.java index 4b2d0b49..af4f304d 100644 --- a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/DurationValue.java +++ b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/DurationValue.java @@ -18,6 +18,17 @@ */ package org.neo4j.jdbc.values; +/** + * The Neo4j duration is different then both Javas {@link java.time.Duration} + * and {@link java.time.Period}. In Java, those are different concepts, + * in which a duration is always time based and exact for the supported units while a + * period is calendar based and therefor does not always have the same number of dates. + * The Neo4j {@link IsoDuration} reassembles what Neo4j does, but blurs the lines between + * a duration and a period. + * + * @author Neo4j Drivers Team + * @since 6.0.0 + */ public final class DurationValue extends AbstractObjectValue { DurationValue(IsoDuration duration) { diff --git a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/FloatValue.java b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/FloatValue.java index 5b063837..82c69f5b 100644 --- a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/FloatValue.java +++ b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/FloatValue.java @@ -18,6 +18,12 @@ */ package org.neo4j.jdbc.values; +/** + * The Cypher type {@code FLOAT} maps to a Java {@link Double}. + * + * @author Neo4j Drivers Team + * @since 6.0.0 + */ public final class FloatValue extends AbstractNumberValue { private final double val; diff --git a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/IntegerValue.java b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/IntegerValue.java index 992c35ad..3017b842 100644 --- a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/IntegerValue.java +++ b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/IntegerValue.java @@ -18,6 +18,12 @@ */ package org.neo4j.jdbc.values; +/** + * The Cypher type {@code INTEGER} maps to a Java {@link Long}. + * + * @author Neo4j Drivers Team + * @since 6.0.0 + */ public final class IntegerValue extends AbstractNumberValue { private final long val; diff --git a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/ListValue.java b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/ListValue.java index d0911464..55022920 100644 --- a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/ListValue.java +++ b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/ListValue.java @@ -25,6 +25,12 @@ import java.util.NoSuchElementException; import java.util.function.Function; +/** + * A Cypher LIST<ANY>. + * + * @author Neo4j Drivers Team + * @since 6.0.0 + */ public final class ListValue extends AbstractValue { private final Value[] values; diff --git a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/LocalDateTimeValue.java b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/LocalDateTimeValue.java index 1d562592..e8022e95 100644 --- a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/LocalDateTimeValue.java +++ b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/LocalDateTimeValue.java @@ -22,6 +22,12 @@ import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatterBuilder; +/** + * The Cypher type {@code LOCAL DATETIME} maps to a Java {@link LocalDateTime}. + * + * @author Neo4j Drivers Team + * @since 6.0.0 + */ public final class LocalDateTimeValue extends AbstractObjectValue { private static final DateTimeFormatter FORMATTER = new DateTimeFormatterBuilder().appendLiteral("DATETIME '") diff --git a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/LocalTimeValue.java b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/LocalTimeValue.java index 0dceea65..7029737b 100644 --- a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/LocalTimeValue.java +++ b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/LocalTimeValue.java @@ -22,6 +22,12 @@ import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatterBuilder; +/** + * The Cypher type {@code LOCAL TIME} maps to a Java {@link LocalTime}. + * + * @author Neo4j Drivers Team + * @since 6.0.0 + */ public final class LocalTimeValue extends AbstractObjectValue { private static final DateTimeFormatter FORMATTER = new DateTimeFormatterBuilder().appendLiteral("TIME '") diff --git a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/LossyCoercion.java b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/LossyCoercion.java index fa3aaf55..eafcc983 100644 --- a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/LossyCoercion.java +++ b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/LossyCoercion.java @@ -20,6 +20,13 @@ import java.io.Serial; +/** + * An exception thrown when the coercion of a Cypher {@code FLOAT} value to a Java + * {@link Float} would be a lossy one. + * + * @author Neo4j Drivers Team + * @since 6.0.0 + */ public final class LossyCoercion extends ValueException { @Serial diff --git a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/MapValue.java b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/MapValue.java index b5e9b249..a60a8a7b 100644 --- a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/MapValue.java +++ b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/MapValue.java @@ -23,6 +23,12 @@ import java.util.Map; import java.util.function.Function; +/** + * Representation of a Cypher map. + * + * @author Neo4j Drivers Team + * @since 6.0.0 + */ public final class MapValue extends AbstractValue { private final Map val; diff --git a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/NodeValue.java b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/NodeValue.java index 06a70052..a8fd5ae6 100644 --- a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/NodeValue.java +++ b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/NodeValue.java @@ -18,6 +18,12 @@ */ package org.neo4j.jdbc.values; +/** + * Representation of a Neo4j node. + * + * @author Neo4j Drivers Team + * @since 6.0.0 + */ public final class NodeValue extends AbstractEntityValue { NodeValue(Node adapted) { diff --git a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/NotMultiValuedException.java b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/NotMultiValuedException.java index a83dfe65..6d7dd592 100644 --- a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/NotMultiValuedException.java +++ b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/NotMultiValuedException.java @@ -20,6 +20,13 @@ import java.io.Serial; +/** + * Exception that is thrown when any {@link Value} object that is not composed by keys and + * values or indexes and values is accessed as a map or a collection item. + * + * @author Neo4j Drivers Team + * @since 6.0.0 + */ public final class NotMultiValuedException extends ValueException { @Serial diff --git a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/NullValue.java b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/NullValue.java index 76e2481b..88427818 100644 --- a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/NullValue.java +++ b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/NullValue.java @@ -18,6 +18,12 @@ */ package org.neo4j.jdbc.values; +/** + * Representation of the Cypher {@code NULL} value. + * + * @author Neo4j Drivers Team + * @since 6.0.0 + */ public final class NullValue extends AbstractValue { /** diff --git a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/PathValue.java b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/PathValue.java index 74954663..732e2cad 100644 --- a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/PathValue.java +++ b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/PathValue.java @@ -18,6 +18,12 @@ */ package org.neo4j.jdbc.values; +/** + * Representation of a Neo4j relationship. + * + * @author Neo4j Drivers Team + * @since 6.0.0 + */ public final class PathValue extends AbstractObjectValue { PathValue(Path adapted) { diff --git a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/PointValue.java b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/PointValue.java index 12298204..324f32d8 100644 --- a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/PointValue.java +++ b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/PointValue.java @@ -18,9 +18,15 @@ */ package org.neo4j.jdbc.values; +/** + * Representation of the Cypher {@code POINT} type. + * + * @author Neo4j Drivers Team + * @since 6.0.0 + */ public final class PointValue extends AbstractObjectValue { - public PointValue(Point point) { + PointValue(Point point) { super(point); } diff --git a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/Record.java b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/Record.java index cb5a96ff..80fc00a5 100644 --- a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/Record.java +++ b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/Record.java @@ -28,6 +28,16 @@ */ public interface Record extends MapAccessorWithDefaultValue { + /** + * Creates a new record for the given list of keys and values. + * @param keys the available keys on the record + * @param values the list of values + * @return a new record + */ + static Record of(List keys, Value[] values) { + return new RecordImpl(keys, values); + } + /** * Retrieve the keys of the underlying map. * @return all field keys in order @@ -51,6 +61,12 @@ public interface Record extends MapAccessorWithDefaultValue { */ int index(String key); + /** + * Retrieves the value at the given {@code index}. + * @param index the index for which to retrieve the value + * @return the value at the given index or {@link Values#NULL} if the index is out of + * bounds + */ Value get(int index); } diff --git a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/internal/bolt/value/RecordImpl.java b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/RecordImpl.java similarity index 89% rename from neo4j-jdbc/src/main/java/org/neo4j/jdbc/internal/bolt/value/RecordImpl.java rename to neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/RecordImpl.java index f29e6a73..691e8b6c 100644 --- a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/internal/bolt/value/RecordImpl.java +++ b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/RecordImpl.java @@ -16,7 +16,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.neo4j.jdbc.internal.bolt.value; +package org.neo4j.jdbc.values; import java.util.Arrays; import java.util.List; @@ -25,12 +25,7 @@ import java.util.function.Function; import java.util.stream.Collectors; -import org.neo4j.jdbc.values.AbstractMapAccessorWithDefaultValue; -import org.neo4j.jdbc.values.Record; -import org.neo4j.jdbc.values.Value; -import org.neo4j.jdbc.values.Values; - -public final class RecordImpl extends AbstractMapAccessorWithDefaultValue implements Record { +final class RecordImpl extends AbstractMapAccessorWithDefaultValue implements Record { private final List keys; @@ -38,7 +33,7 @@ public final class RecordImpl extends AbstractMapAccessorWithDefaultValue implem private int hashCode = 0; - public RecordImpl(List keys, Value[] values) { + RecordImpl(List keys, Value[] values) { this.keys = keys; this.values = values; } diff --git a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/RelationshipValue.java b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/RelationshipValue.java index 7dbcaf85..09489171 100644 --- a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/RelationshipValue.java +++ b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/RelationshipValue.java @@ -18,6 +18,12 @@ */ package org.neo4j.jdbc.values; +/** + * Representation of a Neo4j relationship. + * + * @author Neo4j Drivers Team + * @since 6.0.0 + */ public final class RelationshipValue extends AbstractEntityValue { RelationshipValue(Relationship adapted) { diff --git a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/StringValue.java b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/StringValue.java index 1ce48738..1da808f4 100644 --- a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/StringValue.java +++ b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/StringValue.java @@ -20,6 +20,12 @@ import java.util.Objects; +/** + * The Cypher type {@code STRING} maps directly to a Java {@link String}. + * + * @author Neo4j Drivers Team + * @since 6.0.0 + */ public final class StringValue extends AbstractValue { private final String val; diff --git a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/TimeValue.java b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/TimeValue.java index 805bc7e9..08e50719 100644 --- a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/TimeValue.java +++ b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/TimeValue.java @@ -22,6 +22,12 @@ import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatterBuilder; +/** + * The Cypher type {@code TIME} maps to a Java {@link OffsetTime}. + * + * @author Neo4j Drivers Team + * @since 6.0.0 + */ public final class TimeValue extends AbstractObjectValue { private static final DateTimeFormatter FORMATTER = new DateTimeFormatterBuilder().appendLiteral("TIME '") diff --git a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/Type.java b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/Type.java index 833667c4..672157d0 100644 --- a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/Type.java +++ b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/Type.java @@ -18,8 +18,6 @@ */ package org.neo4j.jdbc.values; -import java.util.Locale; - /** * The type of {@link Value} as defined by the Cypher language. * @@ -152,29 +150,16 @@ public boolean covers(Value value) { */ NULL; - public static Type valueOfV5Name(String in) { - - var value = in.replaceAll("([A-Z]+)([A-Z][a-z])", "$1_$2") - .replaceAll("([a-z])([A-Z])", "$1_$2") - .toUpperCase(Locale.ROOT); - value = switch (value) { - case "LONG" -> Type.INTEGER.name(); - case "DOUBLE" -> Type.FLOAT.name(); - default -> value.endsWith("ARRAY") ? Type.LIST.name() : value; - }; - return Type.valueOf(value); - } - /** * Test if the given value has this type. * @param value the value * @return {@code true} if the value is a value of this type otherwise {@code false} */ - public boolean isTypeOf(Value value) { + public final boolean isTypeOf(Value value) { return this.covers(value); } - protected boolean covers(Value value) { + boolean covers(Value value) { return this == value.type(); } diff --git a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/UncoercibleException.java b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/UncoercibleException.java index df7eb087..95109ea9 100644 --- a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/UncoercibleException.java +++ b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/UncoercibleException.java @@ -20,6 +20,13 @@ import java.io.Serial; +/** + * This exception will be thrown when the coercion {@link Value} into another type is not + * possible. + * + * @author Neo4j Drivers Team + * @since 6.0.0 + */ public final class UncoercibleException extends ValueException { @Serial diff --git a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/UnsizableException.java b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/UnsizableException.java index fdb4aaad..ef9fab5f 100644 --- a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/UnsizableException.java +++ b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/UnsizableException.java @@ -20,6 +20,13 @@ import java.io.Serial; +/** + * This exception will be thrown when a {@link Value} that does not have a size is asks + * for it via {@link Value#size()}. + * + * @author Neo4j Drivers Team + * @since 6.0.0 + */ public final class UnsizableException extends ValueException { @Serial diff --git a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/UnsupportedDateTimeValue.java b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/UnsupportedDateTimeValue.java index 19185bcb..0aca7b89 100644 --- a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/UnsupportedDateTimeValue.java +++ b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/UnsupportedDateTimeValue.java @@ -23,10 +23,24 @@ import java.time.OffsetDateTime; import java.time.ZonedDateTime; +/** + * This value will be returned for date time properties that are stored in a time zone + * that is available on the Neo4j host system but not on the client system in which the + * driver is used. + * + * @author Neo4j Drivers Team + * @since 6.0.0 + */ public final class UnsupportedDateTimeValue extends AbstractValue { final DateTimeException exception; + /** + * Constructs a new value based on the exception the driver caught when reading the + * corresponding message from the Neo4j host system. + * @param exception the original exception caught when trying to deserialize a date + * time value. + */ public UnsupportedDateTimeValue(DateTimeException exception) { this.exception = exception; } diff --git a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/Value.java b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/Value.java index bf6439a2..b0534998 100644 --- a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/Value.java +++ b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/Value.java @@ -56,7 +56,7 @@ * set of methods perform coercions to Java types (wherever possible). For example, a * common String value should be tested for using isString and extracted * using stringValue. - *

+ * *

Navigating a tree structure

*

* Because Neo4j often handles dynamic structures, this interface is designed to help you diff --git a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/ValueException.java b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/ValueException.java index 084a84aa..a95f3b22 100644 --- a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/ValueException.java +++ b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/ValueException.java @@ -20,18 +20,28 @@ import java.io.Serial; +/** + * The base type for several exception that might occur within the Neo4j value system, + * such as a lossy coercion, that might occur when trying to downcast a Cypher + * {@code INTEGER} (which is a 64bit integer), into a Java int (which is only 32bit). + * + * @author Neo4j Drivers Team + * @since 6.0.0 + */ public sealed class ValueException extends RuntimeException permits LossyCoercion, NotMultiValuedException, UncoercibleException, UnsizableException { @Serial private static final long serialVersionUID = 7850167285895596482L; + /** + * Constructs a new exception with the specified detail message. The cause is not + * initialized, and may subsequently be initialized by a call to {@link #initCause}. + * @param message the detail message. The detail message is saved for later retrieval + * by the {@link #getMessage()} method. + */ public ValueException(String message) { super(message); } - public ValueException(String message, Throwable cause) { - super(message, cause); - } - } diff --git a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/internal/bolt/value/ValueUtils.java b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/ValueUtils.java similarity index 92% rename from neo4j-jdbc/src/main/java/org/neo4j/jdbc/internal/bolt/value/ValueUtils.java rename to neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/ValueUtils.java index 6a7538c5..b66cd214 100644 --- a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/internal/bolt/value/ValueUtils.java +++ b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/ValueUtils.java @@ -16,16 +16,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.neo4j.jdbc.internal.bolt.value; +package org.neo4j.jdbc.values; import java.util.Collections; import java.util.LinkedHashMap; import java.util.Map; import java.util.function.Function; -import org.neo4j.jdbc.values.Record; -import org.neo4j.jdbc.values.Value; - final class ValueUtils { private ValueUtils() { diff --git a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/Values.java b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/Values.java index 283a346f..ca1540c6 100644 --- a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/Values.java +++ b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/Values.java @@ -409,7 +409,7 @@ public static Value value(final double val) { * @return the value */ public static Value value(final boolean val) { - return BooleanValue.fromBoolean(val); + return val ? BooleanValue.TRUE : BooleanValue.FALSE; } /** diff --git a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/package-info.java b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/package-info.java index 23223f5b..dfd68877 100644 --- a/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/package-info.java +++ b/neo4j-jdbc/src/main/java/org/neo4j/jdbc/values/package-info.java @@ -16,4 +16,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +/** + * This package contains the Neo4j value systems and is public API. + */ package org.neo4j.jdbc.values; diff --git a/neo4j-jdbc/src/test/java/org/neo4j/jdbc/values/TypeTests.java b/neo4j-jdbc/src/test/java/org/neo4j/jdbc/Neo4jTypeToSqlTypeMapperTests.java similarity index 92% rename from neo4j-jdbc/src/test/java/org/neo4j/jdbc/values/TypeTests.java rename to neo4j-jdbc/src/test/java/org/neo4j/jdbc/Neo4jTypeToSqlTypeMapperTests.java index 07139cb0..a869f79d 100644 --- a/neo4j-jdbc/src/test/java/org/neo4j/jdbc/values/TypeTests.java +++ b/neo4j-jdbc/src/test/java/org/neo4j/jdbc/Neo4jTypeToSqlTypeMapperTests.java @@ -16,17 +16,18 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.neo4j.jdbc.values; +package org.neo4j.jdbc; import java.util.stream.Stream; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; +import org.neo4j.jdbc.values.Type; import static org.assertj.core.api.Assertions.assertThat; -class TypeTests { +class Neo4jTypeToSqlTypeMapperTests { static Stream shouldParseNames() { return Stream.of(Arguments.of("Any", Type.ANY), Arguments.of("Boolean", Type.BOOLEAN), @@ -45,7 +46,7 @@ static Stream shouldParseNames() { @ParameterizedTest @MethodSource void shouldParseNames(String in, Type expected) { - var type = Type.valueOfV5Name(in); + var type = Neo4jTypeToSqlTypeMapper.valueOfV5Name(in); assertThat(type).isEqualTo(expected); } diff --git a/neo4j-jdbc/src/test/java/org/neo4j/jdbc/ResultSetMetaDataImplTests.java b/neo4j-jdbc/src/test/java/org/neo4j/jdbc/ResultSetMetaDataImplTests.java index e75407a6..c3b60c57 100644 --- a/neo4j-jdbc/src/test/java/org/neo4j/jdbc/ResultSetMetaDataImplTests.java +++ b/neo4j-jdbc/src/test/java/org/neo4j/jdbc/ResultSetMetaDataImplTests.java @@ -28,7 +28,6 @@ import org.junit.jupiter.api.Test; import org.neo4j.jdbc.internal.bolt.response.PullResponse; import org.neo4j.jdbc.internal.bolt.response.RunResponse; -import org.neo4j.jdbc.values.Neo4jTypeToSqlTypeMapper; import org.neo4j.jdbc.values.Record; import org.neo4j.jdbc.values.StringValue; import org.neo4j.jdbc.values.Type; diff --git a/pom.xml b/pom.xml index b02369ed..36da29bb 100644 --- a/pom.xml +++ b/pom.xml @@ -309,10 +309,13 @@ **/*.adoc **/*.conf + **/*.csv **/*.cypher **/*.tpl + **/.env **/org.mockito.plugins.MockMaker LICENSE.txt + **/README