(encoder, streamId)
| 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 | |
| 310 | class StartupRequest extends Request { |
nothing calls this directly
no test coverage detected