@@ -234,7 +234,6 @@ class SessionConfig {
234234 * await linkedSession2.close()
235235 * await unlinkedSession.close()
236236 *
237- * @experimental
238237 * @type {BookmarkManager|undefined }
239238 * @since 5.0
240239 */
@@ -306,30 +305,28 @@ class SessionConfig {
306305 }
307306}
308307
309- type RoutingControl = 'WRITERS ' | 'READERS '
310- const WRITERS : RoutingControl = 'WRITERS '
311- const READERS : RoutingControl = 'READERS '
308+ type RoutingControl = 'WRITE ' | 'READ '
309+ const ROUTING_WRITE : RoutingControl = 'WRITE '
310+ const ROUTING_READ : RoutingControl = 'READ '
312311/**
313- * @typedef {'WRITERS '|'READERS ' } RoutingControl
312+ * @typedef {'WRITE '|'READ ' } RoutingControl
314313 */
315314/**
316315 * Constants that represents routing modes.
317316 *
318317 * @example
319- * driver.executeQuery("<QUERY>", <PARAMETERS>, { routing: neo4j.routing.WRITERS })
318+ * driver.executeQuery("<QUERY>", <PARAMETERS>, { routing: neo4j.routing.WRITE })
320319 */
321320const routing = {
322- WRITERS ,
323- READERS
321+ WRITE : ROUTING_WRITE ,
322+ READ : ROUTING_READ
324323}
325324
326325Object . freeze ( routing )
327326
328327/**
329328 * The query configuration
330329 * @interface
331- * @experimental This can be changed or removed anytime.
332- * @see https://github.com/neo4j/neo4j-javascript-driver/discussions/1052
333330 */
334331class QueryConfig < T = EagerResult > {
335332 routing ?: RoutingControl
@@ -348,7 +345,7 @@ class QueryConfig<T = EagerResult> {
348345 *
349346 * @type {RoutingControl }
350347 */
351- this . routing = routing . WRITERS
348+ this . routing = routing . WRITE
352349
353350 /**
354351 * Define the transformation will be applied to the Result before return from the
@@ -379,7 +376,7 @@ class QueryConfig<T = EagerResult> {
379376 * A BookmarkManager is a piece of software responsible for keeping casual consistency between different pieces of work by sharing bookmarks
380377 * between the them.
381378 *
382- * By default, it uses the driver's non mutable driver level bookmark manager. See, {@link Driver.defaultExecuteQueryBookmarkManager }
379+ * By default, it uses the driver's non mutable driver level bookmark manager. See, {@link Driver.executeQueryBookmarkManager }
383380 *
384381 * Can be set to null to disable causal chaining.
385382 * @type {BookmarkManager|null }
@@ -453,11 +450,9 @@ class Driver {
453450 /**
454451 * The bookmark managed used by {@link Driver.executeQuery}
455452 *
456- * @experimental This can be changed or removed anytime.
457453 * @type {BookmarkManager }
458- * @returns {BookmarkManager }
459454 */
460- get defaultExecuteQueryBookmarkManager ( ) : BookmarkManager {
455+ get executeQueryBookmarkManager ( ) : BookmarkManager {
461456 return this . _defaultExecuteQueryBookmarkManager
462457 }
463458
@@ -479,7 +474,7 @@ class Driver {
479474 * const { keys, records, summary } = await driver.executeQuery(
480475 * 'MATCH (p:Person{ name: $name }) RETURN p',
481476 * { name: 'Person1'},
482- * { routing: neo4j.routing.READERS })
477+ * { routing: neo4j.routing.READ })
483478 *
484479 * @example
485480 * // Run a read query returning a Person Nodes per elementId
@@ -507,7 +502,7 @@ class Driver {
507502 * "<QUERY>",
508503 * <PARAMETERS>,
509504 * {
510- * routing: neo4j.routing.WRITERS ,
505+ * routing: neo4j.routing.WRITE ,
511506 * resultTransformer: transformer,
512507 * database: "<DATABASE>",
513508 * impersonatedUser: "<USER>",
@@ -530,21 +525,19 @@ class Driver {
530525 * }
531526 *
532527 * @public
533- * @experimental This can be changed or removed anytime.
534528 * @param {string | {text: string, parameters?: object} } query - Cypher query to execute
535529 * @param {Object } parameters - Map with parameters to use in the query
536530 * @param {QueryConfig<T> } config - The query configuration
537531 * @returns {Promise<T> }
538532 *
539533 * @see {@link resultTransformers } for provided result transformers.
540- * @see https://github.com/neo4j/neo4j-javascript-driver/discussions/1052
541534 */
542535 async executeQuery < T = EagerResult > ( query : Query , parameters ?: any , config : QueryConfig < T > = { } ) : Promise < T > {
543- const bookmarkManager = config . bookmarkManager === null ? undefined : ( config . bookmarkManager ?? this . defaultExecuteQueryBookmarkManager )
536+ const bookmarkManager = config . bookmarkManager === null ? undefined : ( config . bookmarkManager ?? this . executeQueryBookmarkManager )
544537 const resultTransformer = ( config . resultTransformer ?? resultTransformers . eagerResultTransformer ( ) ) as ResultTransformer < T >
545- const routingConfig : string = config . routing ?? routing . WRITERS
538+ const routingConfig : string = config . routing ?? routing . WRITE
546539
547- if ( routingConfig !== routing . READERS && routingConfig !== routing . WRITERS ) {
540+ if ( routingConfig !== routing . READ && routingConfig !== routing . WRITE ) {
548541 throw newError ( `Illegal query routing config: "${ routingConfig } "` )
549542 }
550543
0 commit comments