* Creates a new instance of BatchRequest. * @param {Array.<{query, params, [info]}>} queries Array of objects with the properties query and params * @param {ExecutionOptions} execOptions
(queries, execOptions)
| 407 | * @param {ExecutionOptions} execOptions |
| 408 | */ |
| 409 | constructor(queries, execOptions) { |
| 410 | super(); |
| 411 | this.queries = queries; |
| 412 | this.options = execOptions; |
| 413 | this.timestamp = this.options.getOrGenerateTimestamp(); |
| 414 | this.hints = execOptions.getHints() || utils.emptyArray; |
| 415 | this.type = batchType.logged; |
| 416 | |
| 417 | if (execOptions.isBatchCounter()) { |
| 418 | this.type = batchType.counter; |
| 419 | } else if (!execOptions.isBatchLogged()) { |
| 420 | this.type = batchType.unlogged; |
| 421 | } |
| 422 | } |
| 423 | |
| 424 | /** |
| 425 | * Writes a batch request |
nothing calls this directly
no test coverage detected