{"id":17188392,"url":"https://github.com/loeffel-io/sql","last_synced_at":"2025-09-12T10:33:16.488Z","repository":{"id":57513282,"uuid":"241345783","full_name":"loeffel-io/sql","owner":"loeffel-io","description":"SQL Query Builder - ORM Wrapper","archived":false,"fork":false,"pushed_at":"2020-03-21T17:02:08.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T04:40:33.544Z","etag":null,"topics":["golang","orm","sql"],"latest_commit_sha":null,"homepage":"","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/loeffel-io.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}},"created_at":"2020-02-18T11:37:59.000Z","updated_at":"2020-03-21T17:01:12.000Z","dependencies_parsed_at":"2022-08-31T23:00:33.934Z","dependency_job_id":null,"html_url":"https://github.com/loeffel-io/sql","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/loeffel-io/sql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loeffel-io%2Fsql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loeffel-io%2Fsql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loeffel-io%2Fsql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loeffel-io%2Fsql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loeffel-io","download_url":"https://codeload.github.com/loeffel-io/sql/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loeffel-io%2Fsql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274797648,"owners_count":25351778,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-12T02:00:09.324Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","orm","sql"],"created_at":"2024-10-15T01:08:50.408Z","updated_at":"2025-09-12T10:33:16.467Z","avatar_url":"https://github.com/loeffel-io.png","language":"Go","readme":"# SQL Query Builder - ORM Wrapper\n\n[![Build Status](http://ci.loeffel.io/api/badges/loeffel-io/sql/status.svg)](http://ci.loeffel.io/loeffel-io/sql)\n[![Go Report Card](https://goreportcard.com/badge/github.com/loeffel-io/sql)](https://goreportcard.com/report/github.com/loeffel-io/sql)\n\n- Full flexibility\n- Zero third-party dependencies\n- Useable by any ORM\n- Support for Select, From, Join, Left Join, Where, OrderBy\n\n### [Gorm](https://github.com/jinzhu/gorm) Usage\n\n```go\nsubquery := sql.Create().\n    Select(true, \"purchases.*\").\n    Select(true, \"...\").\n    From(true, \"purchases\").\n    Join(true, \"transactions ON transactions.purchase_id=purchases.id\")\n\nquery := sql.Create().Select(true, \"*\").\n    From(true, \"(?) purchases\", gorm.Expr(subquery.GetSQL(), subquery.GetValues()...)).\n    Join(true, \"transactions ON transactions.id=purchases.last_transaction_id\")\n\ndb.\n    Raw(query.GetSQL(), query.GetValues()...).\n    Offset(...).\n    Limit(...).\n    Order(...).\n    Unscoped().\n    Find(\u0026purchases).\n    Error\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floeffel-io%2Fsql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floeffel-io%2Fsql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floeffel-io%2Fsql/lists"}