{"id":13413670,"url":"https://github.com/hashicorp/go-dbw","last_synced_at":"2026-04-01T17:41:32.367Z","repository":{"id":42125576,"uuid":"429929525","full_name":"hashicorp/go-dbw","owner":"hashicorp","description":"A simple package that encapsulates database operations.","archived":false,"fork":false,"pushed_at":"2026-03-18T19:23:46.000Z","size":267,"stargazers_count":16,"open_issues_count":3,"forks_count":4,"subscribers_count":10,"default_branch":"main","last_synced_at":"2026-03-19T08:42:10.224Z","etag":null,"topics":["database","go","golang","gorm","orm","sql","web"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hashicorp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-11-19T20:45:01.000Z","updated_at":"2026-03-18T19:22:21.000Z","dependencies_parsed_at":"2022-09-09T11:50:32.474Z","dependency_job_id":"966c5302-223a-4f33-a495-223d0daa8067","html_url":"https://github.com/hashicorp/go-dbw","commit_stats":{"total_commits":53,"total_committers":6,"mean_commits":8.833333333333334,"dds":"0.15094339622641506","last_synced_commit":"6cee92b3da36713258cef053fb67812226629403"},"previous_names":["hashicorp/go-db"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/hashicorp/go-dbw","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashicorp%2Fgo-dbw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashicorp%2Fgo-dbw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashicorp%2Fgo-dbw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashicorp%2Fgo-dbw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hashicorp","download_url":"https://codeload.github.com/hashicorp/go-dbw/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashicorp%2Fgo-dbw/sbom","scorecard":{"id":457024,"data":{"date":"2025-08-11","repo":{"name":"github.com/hashicorp/go-dbw","commit":"fc4669397f4f3b4928f18639551629b01aaf36ab"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":6,"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/go.yml:1","Info: topLevel 'contents' permission set to 'read': .github/workflows/make-gen-delta.yml:8","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":"Maintained","score":0,"reason":"1 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":"Code-Review","score":8,"reason":"Found 20/24 approved changesets -- score normalized to 8","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":"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":"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":"Pinned-Dependencies","score":10,"reason":"all dependencies are pinned","details":["Info:   8 out of   8 GitHub-owned GitHubAction 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":"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: Mozilla Public License 2.0: 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":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/hashicorp/.github/SECURITY.md:1","Info: Found linked content: github.com/hashicorp/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/hashicorp/.github/SECURITY.md:1","Info: Found text in security policy: github.com/hashicorp/.github/SECURITY.md:1"],"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":"Branch-Protection","score":6,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'main'","Info: 'force pushes' disabled on branch 'main'","Warn: 'branch protection settings apply to administrators' is disabled on branch 'main'","Info: 'stale review dismissal' is required to merge on branch 'main'","Warn: required approving review count is 1 on branch 'main'","Info: codeowner review is required on branch 'main'","Info: 'last push approval' is required to merge on branch 'main'","Warn: no status checks found to merge onto branch 'main'","Info: PRs are required in order to make changes on branch 'main'"],"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 27 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"}}]},"last_synced_at":"2025-08-19T09:58:59.506Z","repository_id":42125576,"created_at":"2025-08-19T09:58:59.506Z","updated_at":"2025-08-19T09:58:59.506Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31290540,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"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","go","golang","gorm","orm","sql","web"],"created_at":"2024-07-30T20:01:45.980Z","updated_at":"2026-04-01T17:41:32.342Z","avatar_url":"https://github.com/hashicorp.png","language":"Go","readme":"# dbw package\n[![Go Reference](https://pkg.go.dev/badge/github.com/hashicorp/go-dbw.svg)](https://pkg.go.dev/github.com/hashicorp/go-dbw)\n[![Go Report Card](https://goreportcard.com/badge/github.com/hashicorp/go-dbw)](https://goreportcard.com/report/github.com/hashicorp/go-dbw)\n[![Go Coverage](https://raw.githack.com/hashicorp/go-dbw/main/coverage/coverage.svg)](https://raw.githack.com/hashicorp/go-dbw/main/coverage/coverage.html)\n\n[dbw](https://pkg.go.dev/github.com/hashicorp/go-dbw) is a database wrapper that \nsupports connecting and using any database with a\n[GORM](https://github.com/go-gorm/gorm) driver.   \n\n[dbw](https://pkg.go.dev/github.com/hashicorp/go-dbw) is intended to completely\nencapsulate an application's access to its database with the exception of\nmigrations. [dbw](https://pkg.go.dev/github.com/hashicorp/go-dbw) is\nintentionally not an ORM and it removes typical ORM abstractions like \"advanced\nquery building\", associations and migrations.    \n\nOf course you can use [dbw](https://pkg.go.dev/github.com/hashicorp/go-dbw) for\ncomplicated queries, it's just that\n[dbw](https://pkg.go.dev/github.com/hashicorp/go-dbw) doesn't try to reinvent\nSQL by providing some sort of pattern for building them with functions. Of\ncourse, [dbw](https://pkg.go.dev/github.com/hashicorp/go-dbw) also provides\nlookup/search functions when you simply need to read resources from the\ndatabase. \n\n[dbw](https://pkg.go.dev/github.com/hashicorp/go-dbw) strives to make CRUD for\ndatabase resources fairly trivial for common use cases. It also supports an\n[WithOnConflict(...)](https://pkg.go.dev/github.com/hashicorp/go-dbw#WithOnConflict)\noption for its\n[RW.Create(...)](https://pkg.go.dev/github.com/hashicorp/go-dbw#RW.Create) \nfunction for complex scenarios. [dbw](https://pkg.go.dev/github.com/hashicorp/go-dbw) also allows you to opt out of its CRUD\nfunctions and use exec, query and scan rows directly. You may want to carefully\nweigh when it's appropriate to use exec and query directly, since it's likely that\neach time you use them you're leaking a bit of your database layer schema into\nyour application's domain.  \n\n* [Usage highlights](./docs/README_USAGE.md)\n* [Declaring Models](./docs/README_MODELS.md)\n* [Connecting to a Database](./docs/README_OPEN.md)\n* [Options](./docs/README_OPTIONS.md)\n* [NonCreatable and NonUpdatable](./docs/README_INITFIELDS.md)\n* [Readers and Writers](./docs/README_RW.md)\n* [Create](./docs/README_CREATE.md)\n* [Read](./docs/README_READ.md)\n* [Update](./docs/README_UPDATE.md)\n* [Delete](./docs/README_DELETE.md)\n* [Queries](./docs/README_QUERY.md)\n* [Transactions](./docs/README_TX.md)\n* [Hooks](./docs/README_HOOKS.md)\n* [Optimistic locking for write operations](./docs/README_LOCKS.md)\n* [Debug output](./docs/README_DEBUG.md)\n","funding_links":[],"categories":["ORM"],"sub_categories":["HTTP客户端","HTTP Clients"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhashicorp%2Fgo-dbw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhashicorp%2Fgo-dbw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhashicorp%2Fgo-dbw/lists"}