MCPcopy Index your code
hub / github.com/keploy/keploy / IsMySQLSessionReusableCommandType

Function IsMySQLSessionReusableCommandType

pkg/models/lifetime.go:389–395  ·  view source on GitHub ↗

IsMySQLSessionReusableCommandType reports whether a MySQL command packet type (the wire Header.Type string, e.g. "COM_PING") is a connection-alive command whose response is input-independent and therefore safe to treat as session-scoped regardless of the on-disk "mocks" tag. It is the single source

(cmdType string)

Source from the content-addressed store, hash-verified

387// Deliberately narrow — COM_QUERY/COM_INIT_DB/COM_CHANGE_USER/
388// COM_SET_OPTION depend on input and must stay per-test.
389func IsMySQLSessionReusableCommandType(cmdType string) bool {
390 switch cmdType {
391 case "COM_PING", "COM_STATISTICS", "COM_DEBUG", "COM_RESET_CONNECTION":
392 return true
393 }
394 return false
395}

Callers 3

recordMockFunction · 0.92
emitMockV2Function · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected