Skip to content
callcount

package

database/sql

standard library

39 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
20,720
non-test, non-generated
all calls
42,241
total callsites
functions
39
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
Row.Scan 2,051
Rows.Close 1,921
Rows.Next 1,797
Rows.Scan 1,626
Rows.Err 1,400
DB.Close 891
Result.RowsAffected 877
Tx.ExecContext 793
DB.ExecContext 787
Tx.Rollback 747
DB.Exec 718
DB.QueryRowContext 690
Tx.Exec 614
Tx.Commit 539
Open 537
DB.QueryRow 438
DB.QueryContext 435
DB.BeginTx 354
Tx.QueryRowContext 337
DB.Query 328
Named 320
DB.SetMaxOpenConns 228
DB.Begin 189
DB.SetMaxIdleConns 181
Rows.Columns 171
Stmt.Exec 169
Tx.QueryContext 156
Stmt.Close 155
DB.Ping 149
Stmt.ExecContext 141
DB.PingContext 141
Conn.ExecContext 138
Conn.Close 130
DB.Conn 117
DB.Prepare 111
DB.SetConnMaxLifetime 108
Result.LastInsertId 83
Conn.QueryRowContext 80
Tx.QueryRow 73