{"id":41169324,"url":"https://github.com/jobstoit/gqb","last_synced_at":"2026-01-22T19:39:01.248Z","repository":{"id":57500585,"uuid":"189209047","full_name":"jobstoit/gqb","owner":"jobstoit","description":"Golang and SQL query build generation","archived":false,"fork":false,"pushed_at":"2023-02-25T00:54:36.000Z","size":80,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-19T05:42:31.456Z","etag":null,"topics":["database","generation","golang","query-builder","sql-generator"],"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/jobstoit.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":"2019-05-29T11:05:46.000Z","updated_at":"2023-09-27T14:48:13.000Z","dependencies_parsed_at":"2024-06-19T05:31:18.021Z","dependency_job_id":null,"html_url":"https://github.com/jobstoit/gqb","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/jobstoit/gqb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jobstoit%2Fgqb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jobstoit%2Fgqb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jobstoit%2Fgqb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jobstoit%2Fgqb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jobstoit","download_url":"https://codeload.github.com/jobstoit/gqb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jobstoit%2Fgqb/sbom","scorecard":{"id":526116,"data":{"date":"2025-08-11","repo":{"name":"github.com/jobstoit/gqb","commit":"1146e8c3b0a3b5cf9694da7313d34e269a3fa560"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/23 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/go.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":4,"reason":"dependency not pinned by hash detected -- score normalized to 4","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/jobstoit/gqb/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/jobstoit/gqb/go.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/go.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/jobstoit/gqb/go.yml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   1 out of   1 goCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact 0.1.6 not signed: https://api.github.com/repos/jobstoit/gqb/releases/23406472","Warn: release artifact v0.1.0 not signed: https://api.github.com/repos/jobstoit/gqb/releases/17806466","Warn: release artifact 0.1.6 does not have provenance: https://api.github.com/repos/jobstoit/gqb/releases/23406472","Warn: release artifact v0.1.0 does not have provenance: https://api.github.com/repos/jobstoit/gqb/releases/17806466"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 5 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"10 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2022-0229 / GHSA-cjjc-xp8v-855w","Warn: Project is vulnerable to: GO-2020-0012 / GHSA-ffhg-7mh4-33c4","Warn: Project is vulnerable to: GO-2021-0227 / GHSA-3vm4-22fp-5rfm","Warn: Project is vulnerable to: GO-2022-0968 / GHSA-gwc9-m7rh-j2ww","Warn: Project is vulnerable to: GO-2021-0356 / GHSA-8c26-wmh5-6g9v","Warn: Project is vulnerable to: GO-2024-2961","Warn: Project is vulnerable to: GO-2023-2402 / GHSA-45x7-px36-x8w8","Warn: Project is vulnerable to: GO-2024-3321 / GHSA-v778-237x-gjrc","Warn: Project is vulnerable to: GO-2025-3487 / GHSA-hcg3-q754-cr77","Warn: Project is vulnerable to: GO-2020-0036 / GHSA-wxc4-f4m6-wwqv"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T04:25:59.879Z","repository_id":57500585,"created_at":"2025-08-20T04:25:59.880Z","updated_at":"2025-08-20T04:25:59.880Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28669433,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T19:36:09.361Z","status":"ssl_error","status_checked_at":"2026-01-22T19:36:05.567Z","response_time":144,"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":["database","generation","golang","query-builder","sql-generator"],"created_at":"2026-01-22T19:39:01.104Z","updated_at":"2026-01-22T19:39:01.240Z","avatar_url":"https://github.com/jobstoit.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gQB\n[![coverage](https://godoc.org/github.com/jobstoit/gqb?status.svg)](https://godoc.org/github.com/jobstoit/gqb)\n[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fjobstoit%2Fgqb%2Fbadge\u0026style=flat)](https://actions-badge.atrox.dev/jobstoit/gqb/goto)\n[![Go Report Card](https://goreportcard.com/badge/github.com/jobstoit/gqb)](https://goreportcard.com/report/github.com/jobstoit/gqb)\n\nThe generated Query Builder creates a [query builder](https://github.com/ultraware/qb) and if needed a migration using a yaml configuration.\n\nThe gqb takes takes the following flags as arguments:\n```\n-migrate\t\tWrites the configuration to the specified sql file\n\t\t\ttakes the output file as argument\n\n-db\t\t\tDirectly inserts the configured structure as migration\n\t\t\tinto the database using the DB_DRIVER and DB_URL enviroment\n\t\t\tvariables as flags for this mode\n\n-model\t\t\tWrites the configruration to git.ultraware.nl/NiseVoid/qb\n\t\t\tmodels and takes the output as argument\n\n-pkg\t\t\tSpecifies the package name for the qbmodels (default model)\n\n-dvr\t\t\tSpecifies the driver for sql generation (default postgres)\n```\n\n## Configuration\nCreate a configuration file based on the following yaml structure (this is an example configuration):\n```yaml\npkg: models                             # optional\ndriver: mysql                           # optional (default postgres)\ntables:\n  users:\n    id: int, primary\n    email: varchar, unique\n    password: varchar\n    first_name: varchar(50)\n    last_name: varchar(100)\n    role: role                          # foreign key (enum)\n\n  posts:\n    id: int, primary\n    created_by: users.id                # foreign key\n    created_at: datetime, default(NOW)\n    updated_at: datetime, default(NOW)\n    title: varchar\n    subtitle: varchar, nullable\n    context: text\n\n  images:\n    id: int, primary\n    title: varchar\n    created_at: datetime, default(NOW)\n    updated_at: datetime, default(NOW)\n    path: varchar\n\n  post_images:\n    id: int, primary\n    image_id: images.id                 # foreign key\n    post_id: posts(id)                  # another foreign key\n    description: varchar\n\nenums:\n  role:\n  - ADMIN\n  - MODERATOR\n  - GENERAL_USER\n```\n\nThe configuration has the following type constraints:\n```\nprimary\t\t\tsets the type as primary key in the table\nunique\t\t\tset a UNIQUE constraint on the type\nnullable\t\tundoes the default NOT NULL constraint on a type\ndefault(%)\t\tsets the default constraint and uses a parameter to set a default value\nconstraint(%)\t\tsets one or more constraints, constraints can be seperated using ;\n```\n\n# Installation\nInstall this using go get:\n```bash\n$ go get -u github.com/jobstoit/gqb\n```\n\nThen start using it, try:\n```bash\n$ gqb\n```\n\n# Todo\n- [x] Create configuration reader\n- [x] Create SQL generator\n- [x] Create NiseVoid/qb generator\n- [ ] Create a database differential inspector (config against the current state of the database)\n- [ ] Create a diffential SQL generator \u0026 executor\n- [ ] Create a seeder \u0026 seeder configuration\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjobstoit%2Fgqb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjobstoit%2Fgqb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjobstoit%2Fgqb/lists"}