MCPcopy
hub / github.com/jackc/pgx / die

Method die

conn.go:438–446  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

436}
437
438func (c *Conn) die() {
439 if c.IsClosed() {
440 return
441 }
442
443 ctx, cancel := context.WithCancel(context.Background())
444 cancel() // force immediate hard cancel
445 c.pgConn.Close(ctx)
446}
447
448func quoteIdentifier(s string) string {
449 return `"` + strings.ReplaceAll(s, `"`, `""`) + `"`

Callers 2

BeginTxMethod · 0.95
RollbackMethod · 0.80

Calls 2

IsClosedMethod · 0.95
CloseMethod · 0.65

Tested by

no test coverage detected