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

Method write

lib/requests.js:326–353  ·  view source on GitHub ↗
(encoder, streamId)

Source from the content-addressed store, hash-verified

324 }
325
326 write(encoder, streamId) {
327 const frameWriter = new FrameWriter(types.opcodes.startup);
328
329 const startupOptions = {
330 CQL_VERSION: this.options.cqlVersion || '3.0.0',
331 DRIVER_NAME: packageInfo.description,
332 DRIVER_VERSION: packageInfo.version
333 };
334
335 if(this.options.noCompact) {
336 startupOptions['NO_COMPACT'] = 'true';
337 }
338
339 if (this.options.clientId) {
340 startupOptions['CLIENT_ID'] = this.options.clientId.toString();
341 }
342
343 if (this.options.applicationName) {
344 startupOptions['APPLICATION_NAME'] = this.options.applicationName;
345 }
346
347 if (this.options.applicationVersion) {
348 startupOptions['APPLICATION_VERSION'] = this.options.applicationVersion;
349 }
350
351 frameWriter.writeStringMap(startupOptions);
352 return frameWriter.write(encoder.protocolVersion, streamId);
353 }
354}
355
356class RegisterRequest extends Request {

Callers

nothing calls this directly

Calls 3

writeStringMapMethod · 0.95
writeMethod · 0.95
toStringMethod · 0.65

Tested by

no test coverage detected