MCPcopy Create free account
hub / github.com/apache/cassandra-nodejs-driver / constructor

Method constructor

lib/requests.js:409–422  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 4

getHintsMethod · 0.65
isBatchCounterMethod · 0.65
isBatchLoggedMethod · 0.65

Tested by

no test coverage detected