Squirrel VS goqu

Compare Squirrel vs goqu and see what are their differences.

Our great sponsors
  • OPS - Build and Run Open Source Unikernels
  • Scout APM - Less time debugging, more time building
  • SonarQube - Static code analysis for 29 languages.
Squirrel goqu
12 6
4,461 1,371
2.8% -
2.7 6.9
22 days ago 5 days ago
Go Go
GNU General Public License v3.0 or later MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

Squirrel

Posts with mentions or reviews of Squirrel. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-01-02.

goqu

Posts with mentions or reviews of goqu. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-09-30.
  • Migrating from PHP to Go
    26 projects | reddit.com/r/golang | 30 Sep 2021
    https://github.com/doug-martin/goqu for building SQL queries. Supports MySQL and Postgres at least - super handy!
  • We Went All in on Sqlc/Pgx for Postgres and Go
    31 projects | news.ycombinator.com | 8 Sep 2021
    This looks better than typical ORMs, but still not giving me what I want.

    I want query objects to be composable, and mutable. That lets you do things like this: http://btubbs.com/postgres-search-with-facets-and-location-a.... sqlc would force you to write a separate query for each possible permutation of search features that the user opts to use.

    I like the "query builder" pattern you get from Goqu. https://github.com/doug-martin/goqu

  • What are the most useful packages you know for Go?
    15 projects | reddit.com/r/golang | 25 Jul 2021
    github.com/doug-martin/goqu - SQL query builder. Don't like ORMs in general, didn't like GORM. The API is a bit verbose but it does the job and supports tons of SQL features including database specific ones.
  • Yes or No on ORMs???
    2 projects | reddit.com/r/golang | 20 Jul 2021
    Depends on what you mean by ORM. Does query builders qualify as ORM? I tried GORM and didn't like it. Currently using goqu on several projects and like it very much. Use it as plain SQL builder for pgx connector. I have all the power of SQL but without fiddling with strings and bindings. Don't mind scanning manually without reflection.
  • Windyquery: A non-blocking Python PostgreSQL query builder
    5 projects | news.ycombinator.com | 10 May 2021
    That is basically the description of an object mapper, with all the guarantees of an object mapper :). It seems if you actually use the query builder as such, no guarantees exist.

    I'm pretty picky regarding query builders and ORM's, to the extent of having written several of them over the years, in different languages (both dynamic and strong typed, unfortunately closed-source). I'm a strong advocate of schema-first design, and usually a query builder will allow you to design your queries explicitly, but having some internal behaviors (such as string concatenation, identifier quoting and automatic in-order separation of parameters and values to be bound) taken care of. As good examples of this, I'd mention golang's goqu (https://github.com/doug-martin/goqu) and - to some extent - C# SqlKata (https://sqlkata.com/). Following my frustrations with Python ORMs, I built my own toy project, sort-of-in-beta, called rickdb (https://github.com/oddbit-project/rick_db).

  • Using pgx and squirrel with PostgreSQL
    3 projects | reddit.com/r/golang | 26 Feb 2021
    I would recommend to use alternate query builder instead of squirrel. Squirrel lacks some advanced statements such as union, also sometimes it's quite painful to write complex joins using that lib (gogu for example).

What are some alternatives?

When comparing Squirrel and goqu you can also consider the following projects:

sqlx - general purpose extensions to golang's database/sql

GORM - The fantastic ORM library for Golang, aims to be developer friendly

InfluxDB - Scalable datastore for metrics, events, and real-time analytics

pgx - PostgreSQL driver and toolkit for Go

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

sqlx - 🧰 The Rust SQL Toolkit. An async, pure Rust SQL crate featuring compile-time checked queries without a DSL. Supports PostgreSQL, MySQL, SQLite, and MSSQL.

sqlc - Generate type-safe code from SQL

sqrl - Fluent SQL generation for golang

go-mysql-elasticsearch - Sync MySQL data into elasticsearch

pig - Simple pgx wrapper to execute and scan query results

bqb - BQB is a lightweight and easy to use query builder that works with sqlite, mysql, mariadb, postgres, and others.

gonum - Gonum is a set of numeric libraries for the Go programming language. It contains libraries for matrices, statistics, optimization, and more