MCPcopy Create free account
hub / github.com/IceFireDB/IceFireDB / readOK

Method readOK

IceFireDB-SQLProxy/pkg/mysql/client/resp.go:204–217  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

202}
203
204func (c *Conn) readOK() (*Result, error) {
205 data, err := c.ReadPacket()
206 if err != nil {
207 return nil, errors.Trace(err)
208 }
209
210 if data[0] == OK_HEADER {
211 return c.handleOKPacket(data)
212 } else if data[0] == ERR_HEADER {
213 return nil, c.handleErrorPacket(data)
214 } else {
215 return nil, errors.New("invalid ok packet")
216 }
217}
218
219func (c *Conn) readResult(binary bool) (*Result, error) {
220 firstPkgBuf, err := c.ReadPacketReuseMem(utils.ByteSliceGet(16)[:0])

Callers 4

handleAuthResultMethod · 0.95
PingMethod · 0.95
UseDBMethod · 0.95
ReadOKPacketMethod · 0.95

Calls 3

ReadPacketMethod · 0.95
handleOKPacketMethod · 0.95
handleErrorPacketMethod · 0.95

Tested by

no test coverage detected