{"id":34699239,"url":"https://github.com/amarin/query","last_synced_at":"2026-05-26T11:35:30.964Z","repository":{"id":65298996,"uuid":"589255543","full_name":"amarin/query","owner":"amarin","description":"Query implements SQL query builder for Go. The aim is to provide fast and simple interface to database functions without need to write SQL code at all.","archived":false,"fork":false,"pushed_at":"2023-12-07T22:09:04.000Z","size":65,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-21T09:45:04.114Z","etag":null,"topics":["golang","query-builder","sql"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/amarin/query","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amarin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-15T15:37:56.000Z","updated_at":"2023-12-07T20:34:23.000Z","dependencies_parsed_at":"2024-06-21T08:39:28.443Z","dependency_job_id":"eb13d5ac-1e74-46a7-aae2-6ec3cb224228","html_url":"https://github.com/amarin/query","commit_stats":{"total_commits":12,"total_committers":2,"mean_commits":6.0,"dds":"0.41666666666666663","last_synced_commit":"751cf9c0441859fe0e9c60eefc9a611d81b2bc2d"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/amarin/query","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amarin%2Fquery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amarin%2Fquery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amarin%2Fquery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amarin%2Fquery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amarin","download_url":"https://codeload.github.com/amarin/query/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amarin%2Fquery/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33519190,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T03:12:49.672Z","status":"ssl_error","status_checked_at":"2026-05-26T03:12:47.976Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","query-builder","sql"],"created_at":"2025-12-24T22:49:53.139Z","updated_at":"2026-05-26T11:35:30.959Z","avatar_url":"https://github.com/amarin.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# query\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/amarin/query.svg)](https://pkg.go.dev/github.com/amarin/query)\n\nQuery implements SQL query builder for Go.\nThe aim is to provide fast and simple interface to database functions without need to write SQL code at all.\n\nMain features:\n\n- supporting SELECT (and SELECT COUNT() as subset of SELECT), INSERT, UPDATE and DELETE queries;\n- supporting fields conditions to use in SELECT/UPDATE/DELETE queries;\n- supporting field and table names aliasing;\n- supporting tables JOIN's keeping Golang syntax as close to SQL as possible;\n- provides string types to wrap table and field names constants allows to keep all definitions in single place and avoid mistypings;\n- generated queries could use either '?' or '$N' placeholders depending on your needs;\n- supporting conditionals building over single or several joined tables using complex conditions\n- allows to extend standard conditions library with new condition implementations types when required\n- all query builders are immutable which allows to keep original complex query definitions and easily derive new ones\n\n## Alternatives and related projects\n\nHere is open source alternatives on 09.09.2022:\n\n- [sqlf](https://github.com/leporo/sqlf) - A fast SQL query builder for Go, last v1.3.0 fired 05.01.2022, switches  versions ~ once per 3 month\n- [dbr](https://github.com/gocraft/dbr) -  provides additions to Go's database/sql for super fast performance and convenience. Last version v2.7.3 launched 24.12.2021, switches versions ~ once per 6 month. \n- [Squirrel](https://github.com/Masterminds/squirrel) - simple and fluent SQL queries builder from composable parts. Last version v1.5.3 launched 20.05.2022. Development complete, bug fixes will still be merged (slowly). Bug reports are welcome, but I will not necessarily respond to them. If another fork (or substantially similar project) actively improves on what Squirrel does, let me know and I may link to it here.\n- [SQLR](https://github.com/elgris/sqrl) - fat-free version of squirrel - fluent SQL generator for Go. Actually a merge of squirrel and dbr ideas. No published versions at all, last commit on 28.07.2021. Looks stale.\n- [Gocu](https://github.com/doug-martin/goqu) -  An expressive SQL builder and executor. Last version v9.18.0 launched 17.10.2021, before this v9.18.0 about a version per 2 months.\n\nNot really a builders but are the SQL helpers and ORM packages:\n\n- [GORP](https://github.com/go-gorp/gorp) - provides a simple way to marshal Go structs to and from SQL databases. It uses the database/sql package, and should work with any compliant database/sql driver\n- [GORM](https://github.com/go-gorm/gorm) - fantastic ORM library for Golang, aims to be developer friendly.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famarin%2Fquery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famarin%2Fquery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famarin%2Fquery/lists"}