* Reads the body bytes corresponding to the flags * @returns {{traceId: Uuid, warnings: Array, customPayload}} * @throws {RangeError}
()
| 301 | * @throws {RangeError} |
| 302 | */ |
| 303 | readFlagsInfo() { |
| 304 | if (this.header.flags === 0) { |
| 305 | return utils.emptyObject; |
| 306 | } |
| 307 | const result = {}; |
| 308 | if (this.header.flags & types.frameFlags.tracing) { |
| 309 | this.checkOffset(16); |
| 310 | result.traceId = new types.Uuid(utils.copyBuffer(this.read(16))); |
| 311 | } |
| 312 | if (this.header.flags & types.frameFlags.warning) { |
| 313 | result.warnings = this.readStringList(); |
| 314 | } |
| 315 | if (this.header.flags & types.frameFlags.customPayload) { |
| 316 | // Custom payload is a Map<string, Buffer> |
| 317 | result.customPayload = this.readMap(this.readShort(), this.readString, this.readBytes); |
| 318 | } |
| 319 | return result; |
| 320 | } |
| 321 | |
| 322 | /** |
| 323 | * Reads the metadata from a row or a prepared result response |
no test coverage detected