@@ -26,7 +26,7 @@ import { assertString } from './util'
2626const INIT = 0x01 // 0000 0001 // INIT <user_agent> <authentication_token>
2727const ACK_FAILURE = 0x0e // 0000 1110 // ACK_FAILURE - unused
2828const RESET = 0x0f // 0000 1111 // RESET
29- const RUN = 0x10 // 0001 0000 // RUN <statement > <parameters>
29+ const RUN = 0x10 // 0001 0000 // RUN <query > <parameters>
3030const DISCARD_ALL = 0x2f // 0010 1111 // DISCARD_ALL - unused
3131const PULL_ALL = 0x3f // 0011 1111 // PULL_ALL
3232
@@ -68,15 +68,15 @@ export default class RequestMessage {
6868
6969 /**
7070 * Create a new RUN message.
71- * @param {string } statement the cypher statement .
72- * @param {Object } parameters the statement parameters.
71+ * @param {string } query the cypher query .
72+ * @param {Object } parameters the query parameters.
7373 * @return {RequestMessage } new RUN message.
7474 */
75- static run ( statement , parameters ) {
75+ static run ( query , parameters ) {
7676 return new RequestMessage (
7777 RUN ,
78- [ statement , parameters ] ,
79- ( ) => `RUN ${ statement } ${ JSON . stringify ( parameters ) } `
78+ [ query , parameters ] ,
79+ ( ) => `RUN ${ query } ${ JSON . stringify ( parameters ) } `
8080 )
8181 }
8282
@@ -146,27 +146,25 @@ export default class RequestMessage {
146146
147147 /**
148148 * Create a new RUN message with additional metadata.
149- * @param {string } statement the cypher statement .
150- * @param {Object } parameters the statement parameters.
149+ * @param {string } query the cypher query .
150+ * @param {Object } parameters the query parameters.
151151 * @param {Bookmark } bookmark the bookmark.
152152 * @param {TxConfig } txConfig the configuration.
153153 * @param {string } database the database name.
154154 * @param {string } mode the access mode.
155155 * @return {RequestMessage } new RUN message with additional metadata.
156156 */
157157 static runWithMetadata (
158- statement ,
158+ query ,
159159 parameters ,
160160 { bookmark, txConfig, database, mode } = { }
161161 ) {
162162 const metadata = buildTxMetadata ( bookmark , txConfig , database , mode )
163163 return new RequestMessage (
164164 RUN ,
165- [ statement , parameters , metadata ] ,
165+ [ query , parameters , metadata ] ,
166166 ( ) =>
167- `RUN ${ statement } ${ JSON . stringify ( parameters ) } ${ JSON . stringify (
168- metadata
169- ) } `
167+ `RUN ${ query } ${ JSON . stringify ( parameters ) } ${ JSON . stringify ( metadata ) } `
170168 )
171169 }
172170
@@ -239,7 +237,7 @@ function buildTxMetadata (bookmark, txConfig, database, mode) {
239237
240238/**
241239 * Create an object that represents streaming metadata.
242- * @param {Integer|number } stmtId The statement id to stream its results.
240+ * @param {Integer|number } stmtId The query id to stream its results.
243241 * @param {Integer|number } n The number of records to stream.
244242 * @returns {Object } a metadata object.
245243 */
0 commit comments