Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Go
  3. sqlingo

sqlingo

MITGov0.13.0

A lightweight SQL DSL and ORM for Go that generates code from your database and enables elegant SQL query writing.

GitHubGitHub
456 stars26 forks0 contributors

What is sqlingo?

sqlingo is a lightweight SQL DSL and ORM library for Go that generates code from your database schema, allowing developers to write SQL queries in a type-safe, elegant way. It solves the problem of manual synchronization between Go code and database structures while providing compile-time error detection and IDE-friendly features.

Target Audience

Go developers working with SQL databases who want type-safe query building, reduced runtime errors, and better IDE integration without sacrificing SQL expressiveness.

Value Proposition

Developers choose sqlingo because it generates code directly from the database, ensuring models stay synchronized automatically, provides compile-time error checking for SQL queries, and offers an elegant, expressive API with full IDE autocompletion support.

Overview

💥 A lightweight DSL & ORM which helps you to write SQL in Go.

Use Cases

Best For

  • Building Go applications that require type-safe SQL query construction
  • Teams wanting automatic synchronization between database schema and Go models
  • Developers seeking compile-time error detection for SQL queries in Go
  • Projects needing elegant, expressive SQL DSL with IDE autocompletion
  • Applications requiring support for MySQL, PostgreSQL, or SQLite databases
  • Implementing complex SQL queries with subqueries, joins, and transactions in Go

Not Ideal For

  • Projects using PostgreSQL or SQLite in production, due to experimental support
  • Teams preferring raw SQL strings for complex queries or stored procedures without abstraction
  • Applications with rapidly changing database schemas requiring frequent code regeneration
  • Environments where code generation tools are impractical, such as some serverless or strict CI/CD setups

Pros & Cons

Pros

Auto-Generated Type Safety

Generates Go structs and DSL objects directly from the database schema, eliminating manual synchronization and enabling compile-time checks for SQL queries.

Compile-Time Error Detection

Catches common SQL errors during compilation, reducing runtime failures and improving code reliability, as highlighted in the README.

IDE Integration

Enables autocompletion, field suggestions, and usage tracking in editors, enhancing developer productivity with features demonstrated in the demo GIF.

Full DML and Transaction Support

Supports SELECT, INSERT, UPDATE, DELETE with advanced syntax, subqueries, and transactions, providing a robust API for complex queries.

Cons

Limited Database Support

Only MySQL has stable support; PostgreSQL and SQLite are experimental, which restricts its use in production environments with those databases.

Code Generation Overhead

Requires a separate generation step before building, adding complexity to development workflows and CI/CD pipelines, as shown in the tutorial.

Experimental Non-MySQL Features

Support for PostgreSQL and SQLite is explicitly marked as experimental in the README, implying potential bugs or incomplete functionality.

Frequently Asked Questions

Quick Stats

Stars456
Forks26
Contributors0
Open Issues4
Last commit3 months ago
CreatedSince 2018

Tags

#query-builder#orm#database#tidb#sqlbuilder#sql-dsl#postgresql#golang#type-safe#mysql#sqlite#go#code-generation

Built With

G
Go

Included in

Go169.1k
Auto-fetched 17 hours ago

Related Projects

sqlcsqlc

Generate type-safe code from SQL

Stars18,061
Forks1,073
Last commit2 days ago
SquirrelSquirrel

Fluent SQL generation for golang

Stars7,971
Forks516
Last commit2 years ago
xoxo

Command line tool to generate idiomatic Go code for SQL databases supporting PostgreSQL, MySQL, SQLite, Oracle, and Microsoft SQL Server

Stars3,894
Forks335
Last commit3 months ago
jetjet

Type safe SQL builder with code generation and automatic query result data mapping

Stars3,769
Forks186
Last commit1 month ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub