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