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

Method write

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

Source from the content-addressed store, hash-verified

294 }
295
296 write(encoder, streamId) {
297 const frameWriter = new FrameWriter(types.opcodes.prepare);
298 frameWriter.writeLString(this.query);
299 if (types.protocolVersion.supportsPrepareFlags(encoder.protocolVersion)) {
300 const flags = this.keyspace && types.protocolVersion.supportsKeyspaceInRequest(encoder.protocolVersion) ? prepareFlag.withKeyspace : 0;
301 frameWriter.writeInt(flags);
302 if (flags & prepareFlag.withKeyspace) {
303 frameWriter.writeString(this.keyspace);
304 }
305 }
306 return frameWriter.write(encoder.protocolVersion, streamId);
307 }
308}
309
310class StartupRequest extends Request {

Callers

nothing calls this directly

Calls 4

writeLStringMethod · 0.95
writeIntMethod · 0.95
writeStringMethod · 0.95
writeMethod · 0.95

Tested by

no test coverage detected