MCPcopy
hub / github.com/go-gorm/gorm / isUsingClosedConnError

Function isUsingClosedConnError

tests/prepared_stmt_test.go:230–233  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

228}
229
230func isUsingClosedConnError(err error) bool {
231 // https://github.com/golang/go/blob/e705a2d16e4ece77e08e80c168382cdb02890f5b/src/database/sql/sql.go#L2717
232 return err.Error() == "sql: statement is closed"
233}
234
235// TestPreparedStmtConcurrentClose test calling close and executing SQL concurrently
236// this test making sure that the gorm would not get a Segmentation Fault, and the only error cause by this is using a closed Stmt

Callers 1

Calls 1

ErrorMethod · 0.65

Tested by

no test coverage detected