@@ -253,7 +253,6 @@ class SessionConfig {
253253 * await linkedSession2.close()
254254 * await unlinkedSession.close()
255255 *
256- * @experimental
257256 * @type {BookmarkManager|undefined }
258257 * @since 5.0
259258 */
@@ -325,30 +324,28 @@ class SessionConfig {
325324 }
326325}
327326
328- type RoutingControl = 'WRITERS ' | 'READERS '
329- const WRITERS : RoutingControl = 'WRITERS '
330- const READERS : RoutingControl = 'READERS '
327+ type RoutingControl = 'WRITE ' | 'READ '
328+ const ROUTING_WRITE : RoutingControl = 'WRITE '
329+ const ROUTING_READ : RoutingControl = 'READ '
331330/**
332- * @typedef {'WRITERS '|'READERS ' } RoutingControl
331+ * @typedef {'WRITE '|'READ ' } RoutingControl
333332 */
334333/**
335334 * Constants that represents routing modes.
336335 *
337336 * @example
338- * driver.executeQuery("<QUERY>", <PARAMETERS>, { routing: neo4j.routing.WRITERS })
337+ * driver.executeQuery("<QUERY>", <PARAMETERS>, { routing: neo4j.routing.WRITE })
339338 */
340339const routing = {
341- WRITERS ,
342- READERS
340+ WRITE : ROUTING_WRITE ,
341+ READ : ROUTING_READ
343342}
344343
345344Object . freeze ( routing )
346345
347346/**
348347 * The query configuration
349348 * @interface
350- * @experimental This can be changed or removed anytime.
351- * @see https://github.com/neo4j/neo4j-javascript-driver/discussions/1052
352349 */
353350class QueryConfig < T = EagerResult > {
354351 routing ?: RoutingControl
@@ -367,7 +364,7 @@ class QueryConfig<T = EagerResult> {
367364 *
368365 * @type {RoutingControl }
369366 */
370- this . routing = routing . WRITERS
367+ this . routing = routing . WRITE
371368
372369 /**
373370 * Define the transformation will be applied to the Result before return from the
@@ -398,7 +395,7 @@ class QueryConfig<T = EagerResult> {
398395 * A BookmarkManager is a piece of software responsible for keeping casual consistency between different pieces of work by sharing bookmarks
399396 * between the them.
400397 *
401- * By default, it uses the driver's non mutable driver level bookmark manager. See, {@link Driver.defaultExecuteQueryBookmarkManager }
398+ * By default, it uses the driver's non mutable driver level bookmark manager. See, {@link Driver.executeQueryBookmarkManager }
402399 *
403400 * Can be set to null to disable causal chaining.
404401 * @type {BookmarkManager|null }
@@ -472,11 +469,9 @@ class Driver {
472469 /**
473470 * The bookmark managed used by {@link Driver.executeQuery}
474471 *
475- * @experimental This can be changed or removed anytime.
476472 * @type {BookmarkManager }
477- * @returns {BookmarkManager }
478473 */
479- get defaultExecuteQueryBookmarkManager ( ) : BookmarkManager {
474+ get executeQueryBookmarkManager ( ) : BookmarkManager {
480475 return this . _defaultExecuteQueryBookmarkManager
481476 }
482477
@@ -498,7 +493,7 @@ class Driver {
498493 * const { keys, records, summary } = await driver.executeQuery(
499494 * 'MATCH (p:Person{ name: $name }) RETURN p',
500495 * { name: 'Person1'},
501- * { routing: neo4j.routing.READERS })
496+ * { routing: neo4j.routing.READ })
502497 *
503498 * @example
504499 * // Run a read query returning a Person Nodes per elementId
@@ -526,7 +521,7 @@ class Driver {
526521 * "<QUERY>",
527522 * <PARAMETERS>,
528523 * {
529- * routing: neo4j.routing.WRITERS ,
524+ * routing: neo4j.routing.WRITE ,
530525 * resultTransformer: transformer,
531526 * database: "<DATABASE>",
532527 * impersonatedUser: "<USER>",
@@ -549,21 +544,19 @@ class Driver {
549544 * }
550545 *
551546 * @public
552- * @experimental This can be changed or removed anytime.
553547 * @param {string | {text: string, parameters?: object} } query - Cypher query to execute
554548 * @param {Object } parameters - Map with parameters to use in the query
555549 * @param {QueryConfig<T> } config - The query configuration
556550 * @returns {Promise<T> }
557551 *
558552 * @see {@link resultTransformers } for provided result transformers.
559- * @see https://github.com/neo4j/neo4j-javascript-driver/discussions/1052
560553 */
561554 async executeQuery < T = EagerResult > ( query : Query , parameters ?: any , config : QueryConfig < T > = { } ) : Promise < T > {
562- const bookmarkManager = config . bookmarkManager === null ? undefined : ( config . bookmarkManager ?? this . defaultExecuteQueryBookmarkManager )
555+ const bookmarkManager = config . bookmarkManager === null ? undefined : ( config . bookmarkManager ?? this . executeQueryBookmarkManager )
563556 const resultTransformer = ( config . resultTransformer ?? resultTransformers . eagerResultTransformer ( ) ) as ResultTransformer < T >
564- const routingConfig : string = config . routing ?? routing . WRITERS
557+ const routingConfig : string = config . routing ?? routing . WRITE
565558
566- if ( routingConfig !== routing . READERS && routingConfig !== routing . WRITERS ) {
559+ if ( routingConfig !== routing . READ && routingConfig !== routing . WRITE ) {
567560 throw newError ( `Illegal query routing config: "${ routingConfig } "` )
568561 }
569562
0 commit comments