jmoiron

    jmoiron/sqlx

    general purpose extensions to golang's database/sql

    17.7K stars
    1.1K forks
    188 GitHub watchers
    Updated Nov 6, 2026
    View on GitHub

    Build with Backblaze B2

    SDKs, agent skills, IDE extensions, and reference pipelines from Backblaze Labs. All open source.

    Explore Backblaze Labs

    Loading star history...

    Where it stands

    Rank, growth pace and release cadence relative to everything GStars tracks.

    No releases in the last 90 days; the most recent was 926 days ago, with 76 contributors on GitHub.

    Use Cases & Benefits

    • Provides extensions to Go's database/sql for easier and more powerful database interactions.
    • Enhances database/sql with struct marshalling, named parameters, and convenient query methods without breaking existing interfaces.
    • Use for simplifying data mapping from SQL rows to Go structs and slices in Go applications.
    • Use for executing named parameter queries and batch inserts with structs or maps for cleaner and safer SQL code.
    • Use for integrating advanced SQL features into existing Go codebases while maintaining compatibility with database/sql.

    Should you depend on it?

    License terms, project hygiene and risks, from GitHub metadata and GStars' snapshots.

    License

    MIT

    Permissive: commercial use, modification and redistribution are allowed with attribution.

    Community files

    • README: present

    Watch-outs

    • Warning: No commits in over a year (last push Aug 2024).

    General guidance from repository metadata, not legal advice. How we score

    From the README

    sqlx is a library which provides a set of extensions on go's standard database/sql library. The sqlx versions of sql.DB, sql.TX, sql.Stmt, et al. all leave the underlying interfaces untouched, so that their interfaces are a superset on the standard ones. This makes it relatively painless to integrate existing codebases using database/sql with sqlx.

    In addition to the godoc API documentation, there is also some user documentation that explains how to use database/sql along with sqlx.

    DB.Connx returns an sqlx.Conn, which is an sql.Conn-alike consistent with sqlx's wrapping of other types.

    BindDriver allows users to control the bindvars that sqlx will use for drivers, and add new drivers at runtime. This results in a very slight performance hit when resolving the driver into a bind type (~40ns per call), but it allows users to specify what bindtype their driver uses even when sqlx has not been updated to know about it by default.

    Compatibility with the most recent two versions of Go is a requirement for any new changes. Compatibility beyond that is not guaranteed.

    Versioning is done with Go modules. Breaking changes (eg. removing deprecated API) will get major version number bumps.

    Excerpt from the jmoiron/sqlx README on GitHub (MIT license). © its authors.Read the full README on GitHub

    Daily snapshots

    Stars gained per day, and how forks and open issues moved, from GStars' daily snapshots

    Forks

    1.1K+2

    Open issues

    397-2

    Compared with peers in Database

    Fastest-growing repositories GStars tracks in this cohort for the week of Nov 1, by 7-day star growth

    jmoiron/sqlx compared with Database repositories by stars, 7-day star growth, health score and last release
    RepositoryStars+7dHealthLast release
    thedotmack/claude-mem113.6K+8.8K35today
    t8y2/dbx29.1K+1.0K40today
    gitroomhq/postiz-app41.0K+8656412 days ago
    supabase/supabase114.6K+2686090 days ago
    juicedata/juicefs14.7K+1056414 days ago
    jmoiron/sqlx17.7K—35926 days ago
    Category median41.0K+86560—

    Discover Repositories

    Search across tracked repositories by name or description