File tree Expand file tree Collapse file tree 3 files changed +16
-9
lines changed
driver/src/main/java/org/neo4j/driver Expand file tree Collapse file tree 3 files changed +16
-9
lines changed Original file line number Diff line number Diff line change 38
38
import org .neo4j .driver .internal .handlers .pulln .FetchSizeUtil ;
39
39
import org .neo4j .driver .internal .retry .ExponentialBackoffRetryLogic ;
40
40
import org .neo4j .driver .net .ServerAddressResolver ;
41
- import org .neo4j .driver .querytask .QueryConfig ;
42
41
import org .neo4j .driver .util .Experimental ;
43
42
import org .neo4j .driver .util .Immutable ;
44
43
@@ -129,7 +128,7 @@ private Config(ConfigBuilder builder) {
129
128
130
129
/**
131
130
* A {@link BookmarkManager} implementation for the driver to use on
132
- * {@link Driver#executeQuery(Query, QueryConfig )} method and its variants by default.
131
+ * {@link Driver#queryTask(String )} method and its variants by default.
133
132
* <p>
134
133
* Please note that sessions will not use this automatically, but it is possible to enable it explicitly
135
134
* using {@link SessionConfig.Builder#withBookmarkManager(BookmarkManager)}.
@@ -302,7 +301,7 @@ private ConfigBuilder() {}
302
301
303
302
/**
304
303
* Sets a {@link BookmarkManager} implementation for the driver to use on
305
- * {@link Driver#executeQuery(Query, QueryConfig )} method and its variants by default.
304
+ * {@link Driver#queryTask(String )} method and its variants by default.
306
305
* <p>
307
306
* Please note that sessions will not use this automatically, but it is possible to enable it explicitly
308
307
* using {@link SessionConfig.Builder#withBookmarkManager(BookmarkManager)}.
Original file line number Diff line number Diff line change 27
27
import org .neo4j .driver .BookmarkManager ;
28
28
import org .neo4j .driver .Config ;
29
29
import org .neo4j .driver .Driver ;
30
- import org .neo4j .driver .Query ;
31
30
import org .neo4j .driver .util .Experimental ;
32
31
33
32
/**
34
- * Query configuration used by {@link Driver#executeQuery(Query, QueryConfig )} and its variants.
33
+ * Query configuration used by {@link Driver#queryTask(String )} and its variants.
35
34
* @since 5.5
36
35
*/
37
36
@ Experimental
@@ -65,8 +64,8 @@ private QueryConfig(Builder builder) {
65
64
}
66
65
67
66
/**
68
- * Creates a new {@link Builder} used to construct a configuration object with default {@link ResultTransformer}
69
- * implementation returning {@link EagerResult}.
67
+ * Creates a new {@link Builder} used to construct a configuration object with default implementation returning
68
+ * {@link EagerResult}.
70
69
*
71
70
* @return a query configuration builder
72
71
*/
Original file line number Diff line number Diff line change 68
68
* }
69
69
* </pre>
70
70
* <p>
71
- * In addition, it is possible to transform query result by using a provided {@link Collector}.
72
- * Examples:
71
+ * In addition, it is possible to transform query result by using a supplied {@link Collector} implementation.
72
+ * <p>
73
+ * <b>It is strongly recommended to use Cypher query language capabilities where possible</b>. The examples below just
74
+ * provide a sample usage of the API.
73
75
* <pre>
74
76
* {@code
77
+ * import static java.util.stream.Collectors.*;
75
78
*
79
+ * var averagingLong = driver.queryTask("UNWIND range(0, 5) as N RETURN N")
80
+ * .execute(averagingLong(record -> record.get("N").asLong()));
81
+ * var filteredValues = driver.queryTask("UNWIND range(0, 5) as N RETURN N")
82
+ * .execute(mapping(record -> record.get("N").asLong(), filtering(value -> value > 2, toList())));
83
+ * var maxValue = driver.queryTask("UNWIND range(0, 5) as N RETURN N")
84
+ * .execute(mapping(record -> record.get("N").asLong(), maxBy(Long::compare)));
76
85
* }
77
86
* </pre>
78
87
*
You can’t perform that action at this time.
0 commit comments