MCPcopy Create free account
hub / github.com/Effect-TS/effect / finish

Method finish

packages/sql/pg/src/PgProtocol.ts:565–577  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

563 }
564
565 finish(): Uint8Array {
566 const value = view(this.bytes.buffer, this.bytes.byteOffset + this.start, this.offset - this.start)
567 if (this.bytes.length > this.poolSize) {
568 // An oversized message grew the pool; do not keep the rest of it around.
569 this.bytes = new Uint8Array(this.poolSize)
570 this.view = new DataView(this.bytes.buffer)
571 this.start = 0
572 this.offset = 0
573 } else {
574 this.start = this.offset
575 }
576 return value
577 }
578}
579
580const emptyBytes = new Uint8Array(0)

Callers 7

endFunction · 0.45
emptyFunction · 0.45
encodeSslRequestFunction · 0.45
encodeStartupMessageFunction · 0.45
encodeCancelRequestFunction · 0.45
completeMethod · 0.45
onFatalMethod · 0.45

Calls 1

viewFunction · 0.70

Tested by

no test coverage detected