MCPcopy Create free account
hub / github.com/cloudwan/gohan / logQuery

Method logQuery

db/sql/sql.go:597–601  ·  view source on GitHub ↗
(sql string, args ...interface{})

Source from the content-addressed store, hash-verified

595}
596
597func (tx *Transaction) logQuery(sql string, args ...interface{}) {
598 sqlFormat := strings.Replace(sql, "?", "%s", -1)
599 query := fmt.Sprintf(sqlFormat, args...)
600 log.Debug("[%p] Executing SQL query '%s'", tx.transaction, query)
601}
602
603func (tx *Transaction) measureTime(timeStarted time.Time, schemaId, action string) {
604 metrics.UpdateTimer(timeStarted, "tx.%s.%s", schemaId, action)

Callers 4

execMethod · 0.95
executeSelectMethod · 0.95
QueryContextMethod · 0.95
StateFetchContextMethod · 0.95

Calls 1

DebugMethod · 0.65

Tested by

no test coverage detected