go-sqlexgo-sqlexOfficialยท1 Agent Skills Included

sqlex

Cross-database Go SQL wrapper with hooks and JSON types

Provides a drop-in Go database wrapper that maps SQL rows to structs, expands IN clauses, and auto-converts placeholders across PostgreSQL, MySQL, SQLite, and SQL Server. Eliminates manual placeholder rewriting, silent data corruption bugs, and repetitive transaction boilerplate inherited from sqlx. Adds pluggable query hooks, generic JSON column types, and safe commit-or-rollback handling to speed up everyday database code.
npx skills add go-sqlex/sqlex --all -g -y

All Skills in This Repository (1)

Pure Emerald Level Indicators

Frequently Asked Questions

FAQPage Schema
How to install sqlex?โ–ผ

Run `npx skills add go-sqlex/sqlex --all -g -y` in your terminal to install this skill globally.

How to migrate from sqlx to sqlex?โ–ผ

Just change the import path from jmoiron/sqlx to go-sqlex/sqlex and update go.mod. All existing sqlx code keeps working without changes.

Does sqlex work with PostgreSQL and MySQL?โ–ผ

Yes. You write queries with the ? placeholder once, and sqlex automatically converts them for PostgreSQL, MySQL, SQLite, and SQL Server.

What bugs does sqlex fix from sqlx?โ–ผ

It fixes over 20 known sqlx issues, including data corruption with RawBytes, panics on nil values, silent row loss in batch inserts, and broken named queries on PostgreSQL.

Can I add logging or tracing to SQL queries?โ–ผ

Yes. The built-in hook system lets you register interceptors for logging, metrics, and tracing globally or per individual query call.

Related Repositories in Software Engineering

View All in Software Engineeringโ†’