MCPcopy Create free account
hub / github.com/dolthub/doltgresql / NewWireReader

Function NewWireReader

utils/wirerw.go:44–50  ·  view source on GitHub ↗

NewWireReader creates a new WireRW for reading from data previously written by either a valid Postgres server or a WireRW instance. This is intended strictly for reading the binary wire format that Postgres expects, and should not be used for internal read operations (utils.Reader is for internal us

(data []byte)

Source from the content-addressed store, hash-verified

42// a WireRW instance. This is intended strictly for reading the binary wire format that Postgres expects, and should not
43// be used for internal read operations (utils.Reader is for internal use).
44func NewWireReader(data []byte) *WireRW {
45 return &WireRW{
46 buf: bytes.NewBuffer(data),
47 readIdx: 0,
48 numSlice: make([]byte, 8), // 8 bytes will cover all floats and integers
49 }
50}
51
52// ReadBool reads a 1-byte bool.
53func (rw *WireRW) ReadBool() bool {

Callers 14

float8.goFile · 0.92
record_recv_callableFunction · 0.92
regclass.goFile · 0.92
numeric.goFile · 0.92
timetz.goFile · 0.92
int2.goFile · 0.92
regproc.goFile · 0.92
array_recv_callableFunction · 0.92
float4.goFile · 0.92
xid.goFile · 0.92
oid.goFile · 0.92
int8.goFile · 0.92

Calls 1

NewBufferMethod · 0.65

Tested by

no test coverage detected