Skip to content
callcount

package

database/sql

standard library

40 standard-library functions from database/sql, ranked by how often they are called outside tests and generated code.

Docs on pkg.go.dev ↗

prod calls
19,210
non-test, non-generated
all calls
35,200
total callsites
functions
40
ranked in this snapshot
origin
std
standard-library

members

Functions in database/sql

Ranked by production calls. The bar scales each function against the busiest in this package.

Function Prod calls
Rows.Close 1,881
Rows.Next 1,792
Rows.Scan 1,635
Row.Scan 1,627
Rows.Err 1,401
Result.RowsAffected 796
DB.Close 792
DB.Exec 720
DB.ExecContext 709
Tx.ExecContext 646
Tx.Exec 606
DB.QueryRowContext 580
Tx.Rollback 532
Open 527
DB.QueryContext 441
DB.QueryRow 431
Tx.Commit 420
DB.Query 327
Named 302
Tx.QueryRowContext 229
DB.SetMaxOpenConns 213
DB.BeginTx 212
Stmt.Exec 194
DB.Begin 186
DB.SetMaxIdleConns 166
Conn.ExecContext 161
Rows.Columns 161
Tx.QueryContext 161
Stmt.Close 153
DB.Ping 153
Tx.Query 151
DB.PingContext 137
DB.Prepare 127
Stmt.ExecContext 117
DB.SetConnMaxLifetime 106
Conn.Close 105
DB.Conn 99
Result.LastInsertId 79
Tx.QueryRow 71
Tx.Prepare 64