{"repo":"kirill-scherba/sqlh","free":true,"listed":false,"github":"https://github.com/kirill-scherba/sqlh","clone":"git clone https://github.com/kirill-scherba/sqlh.git","description":"A lightweight Go SQL helper library using generics to reduce boilerplate code","language":"Go","stars":15,"topics":["database","go-generics","golang","lightweight","orm-like","query-builder","sql","sqlite","sql-helper"],"license":"BSD-3-Clause","category":"databases-storage","readme_excerpt":"sqlh: A Go SQL Helper Package sqlh is a lightweight helper package for Go that simplifies interactions with SQL databases. It leverages Go generics (Go 1.25+) to provide type-safe CRUD functions ( Insert , Get , List , Update , Delete , Set ) that work directly with your Go structs, automatically generating SQL queries from struct definitions using struct tags — reducing boilerplate code by 60-80%. Demo Zero boilerplate. Define your struct with tags, and sqlh generates all SQL. Watch: struct → CREATE TABLE → Insert → Get → List → Update → Delete — all type-safe. Features - Generic Type-Safe API: Work with any struct type T any — no manual SQL writing, no type assertions. - Automatic Query Generation: Auto-generates CREATE TABLE , INSERT , UPDATE , SELECT , and DELETE statements from struct definitions. - Struct Tag-Based Mapping: Use db (column name), db type (SQL type override), and db key (constraints) tags to control table and column definitions. - Autoincrement Support: Automatically excludes fields marked with autoincrement from INSERT and UPDATE statements. - Built-in Transactions: All write operations ( Insert , Update , Delete , Set ) are automatically wrapped in transactions with proper rollback on error. - Database Lock Retry: Built-in retry mechanism (up to 20 attempts with 100ms delay) for \"database is locked\" errors — ideal for SQLite. - Go 1.25 Iterators: ListRange returns iter.Seq2[int, T] for lazy iteration over query results. - Pagination: ListRows and ListRa","default_branch":null,"files":null,"tree":[],"storefront":"/r/kirill-scherba","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/kirill-scherba/sqlh/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}