{"id":23163535,"url":"https://github.com/oussama4/sqlbuilder","last_synced_at":"2025-06-30T23:03:04.031Z","repository":{"id":133816551,"uuid":"423180054","full_name":"oussama4/sqlbuilder","owner":"oussama4","description":"A simple sql query builder for Go","archived":false,"fork":false,"pushed_at":"2022-02-13T18:27:44.000Z","size":24,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-04T20:41:00.910Z","etag":null,"topics":["database","go","golang","orm","query-builder","sql","sql-builder"],"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/oussama4.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":"2021-10-31T15:06:19.000Z","updated_at":"2024-12-09T20:42:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"1a3bdcb8-04bd-4a0d-9401-4f45f2574eb1","html_url":"https://github.com/oussama4/sqlbuilder","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/oussama4/sqlbuilder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oussama4%2Fsqlbuilder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oussama4%2Fsqlbuilder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oussama4%2Fsqlbuilder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oussama4%2Fsqlbuilder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oussama4","download_url":"https://codeload.github.com/oussama4/sqlbuilder/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oussama4%2Fsqlbuilder/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262863648,"owners_count":23376451,"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","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":["database","go","golang","orm","query-builder","sql","sql-builder"],"created_at":"2024-12-18T00:19:13.173Z","updated_at":"2025-06-30T23:03:03.994Z","avatar_url":"https://github.com/oussama4.png","language":"Go","readme":"# A simple package for building sql queries in Go.\n\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/oussama4/sqlbuilder.svg)](https://pkg.go.dev/github.com/oussama4/sqlbuilder)\n\n\n- [Usage](#usage)\n   - [Basic queries](#basic-queries)\n\t - [Select](#select)\n\t - [Update](#update)\n\t - [Insert](#insert)\n\t - [Delete](#delete)\n\n\n## Usage\n### Basic queries\n#### Select\n```go\n// query: SELECT * FROM products\nquery, _ := sqlbuilder.Select(\"*\").From(\"products\").\n\t\tQuery()\n\n// query: SELECT id, title FROM products\nquery, _ := sqlbuilder.Select(\"id\", \"title\").From(\"products\").\n\t\tQuery()\n```\n\n#### Update\n```go\n// query: UPDATE products SET title = $1\n// args: []interface{}{\"new title\"}\nquery, args := sqlbuilder.Update(\"products\").\n\t\tSet(\"title\", \"new title\").\n\t\tQuery()\n```\n\n#### Insert\n```go\n// query: INSERT INTO products (title, description)\n// \t\t  VALUES ($1, $2)\n// args: []interface{}{\"new title\", \"new description\"}\nquery, args := sqlbuilder.Insert(\"products\").\n\t\tColumns(\"title\", \"description\").\n\t\tValues(\"new title\", \"new desscription\").\n\t\tQuery()\n```\n\n#### Delete\n```go\n// query: DELETE FROM products\nquery, _ := sqlbuilder.DeleteFrom(\"products\").Query()\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foussama4%2Fsqlbuilder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foussama4%2Fsqlbuilder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foussama4%2Fsqlbuilder/lists"}