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

Method ExecuteSelectStreaming

IceFireDB-SQLite/pkg/mysql/client/conn.go:200–206  ·  view source on GitHub ↗

ExecuteSelectStreaming will call perRowCallback for every row in resultset WITHOUT saving any row data to Result.{Values/RawPkg/RowDatas} fields. ExecuteSelectStreaming should be used only for SELECT queries with a large response resultset for memory preserving. Example: var result mysql.Res

(command string, result *Result, perRowCallback SelectPerRowCallback)

Source from the content-addressed store, hash-verified

198// return nil
199// })
200func (c *Conn) ExecuteSelectStreaming(command string, result *Result, perRowCallback SelectPerRowCallback) error {
201 if err := c.writeCommandStr(COM_QUERY, command); err != nil {
202 return errors.Trace(err)
203 }
204
205 return c.readResultStreaming(false, result, perRowCallback)
206}
207
208func (c *Conn) Begin() error {
209 _, err := c.exec("BEGIN")

Callers

nothing calls this directly

Calls 2

writeCommandStrMethod · 0.95
readResultStreamingMethod · 0.95

Tested by

no test coverage detected