{"id":18872786,"url":"https://github.com/survivorbat/gorm-deep-filtering","last_synced_at":"2025-09-09T12:41:36.032Z","repository":{"id":61603234,"uuid":"552356365","full_name":"survivorbat/gorm-deep-filtering","owner":"survivorbat","description":"Allow gorm's Where() to take in maps of maps that are automatically converted into subqueries","archived":false,"fork":false,"pushed_at":"2025-03-13T16:46:47.000Z","size":100,"stargazers_count":11,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-21T16:52:45.976Z","etag":null,"topics":["deep","deep-filter","deep-filtering","deep-map","filter","filtering","go","go-map","go-orm","golang","gorm","gorm-orm","gorm-plugin","many-to-many","many-to-one","map","map-deep","multi-query","one-to-many"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/survivorbat/gorm-deep-filtering","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/survivorbat.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,"zenodo":null}},"created_at":"2022-10-16T12:10:17.000Z","updated_at":"2025-03-13T16:46:52.000Z","dependencies_parsed_at":"2024-01-11T16:04:28.176Z","dependency_job_id":"d25e11fa-0c6a-4243-be5c-2b8a443f9bc0","html_url":"https://github.com/survivorbat/gorm-deep-filtering","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/survivorbat/gorm-deep-filtering","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/survivorbat%2Fgorm-deep-filtering","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/survivorbat%2Fgorm-deep-filtering/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/survivorbat%2Fgorm-deep-filtering/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/survivorbat%2Fgorm-deep-filtering/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/survivorbat","download_url":"https://codeload.github.com/survivorbat/gorm-deep-filtering/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/survivorbat%2Fgorm-deep-filtering/sbom","scorecard":{"id":860315,"data":{"date":"2025-08-11","repo":{"name":"github.com/survivorbat/gorm-deep-filtering","commit":"d619c4cd55533c9655cb8a7d241e3538bafbf112"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.1,"checks":[{"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/test.yaml: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":"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":"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":"Code-Review","score":3,"reason":"Found 5/13 approved changesets -- score normalized to 3","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":"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yaml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/survivorbat/gorm-deep-filtering/test.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yaml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/survivorbat/gorm-deep-filtering/test.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yaml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/survivorbat/gorm-deep-filtering/test.yaml/master?enable=pin","Info:   0 out of   3 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":"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":"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":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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 22 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-24T01:04:56.159Z","repository_id":61603234,"created_at":"2025-08-24T01:04:56.159Z","updated_at":"2025-08-24T01:04:56.159Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274296633,"owners_count":25258885,"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-09T02:00:10.223Z","response_time":80,"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":["deep","deep-filter","deep-filtering","deep-map","filter","filtering","go","go-map","go-orm","golang","gorm","gorm-orm","gorm-plugin","many-to-many","many-to-one","map","map-deep","multi-query","one-to-many"],"created_at":"2024-11-08T05:32:15.695Z","updated_at":"2025-09-09T12:41:35.990Z","avatar_url":"https://github.com/survivorbat.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌌 Gorm Deep Filtering Plugin\n\n[![Go package](https://github.com/survivorbat/gorm-deep-filtering/actions/workflows/test.yaml/badge.svg)](https://github.com/survivorbat/gorm-deep-filtering/actions/workflows/test.yaml)\n![GitHub](https://img.shields.io/github/license/survivorbat/gorm-deep-filtering)\n![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/survivorbat/gorm-deep-filtering)\n\nEver wanted to filter objects on a deep level using only maps? This plugin allows you to do just that.\n\n```go\npackage main\n\nfunc main () {\n\tfilters := map[string]any{\n\t\t\"name\": \"abc\",\n\t\t\"related_object\": map[string]any{\n\t\t\t\"title\": \"engineer\",\n\t\t},\n\t}\n}\n```\n\nIs automatically turned into a query that looks like this:\n\n```sql\nSELECT * FROM employees WHERE related_object_id IN (SELECT id FROM occupations WHERE title = \"engineer\")\n```\n\n## 💡 Related Libraries\n\n- [gormlike](https://github.com/survivorbat/gorm-like) turns WHERE-calls into LIkE queries if certain tokens were found\n- [gormqonvert](https://github.com/survivorbat/gorm-query-convert) turns WHERE-calls into different queries if certain tokens were found\n- [gormcase](https://github.com/survivorbat/gorm-case) adds case insensitivity to WHERE queries\n- [gormtestutil](https://github.com/ing-bank/gormtestutil) provides easy utility methods for unit-testing with gorm\n\n## ⬇️ Installation\n\n`go get github.com/survivorbat/gorm-deep-filtering`\n\n## 📋 Usage\n\n```go\npackage main\n\nimport (\n    \"github.com/survivorbat/gorm-deep-filtering\"\n)\n\nfunc main() {\n\tdb, _ := gorm.Open(sqlite.Open(\"test.db\"), \u0026gorm.Config{})\n\n\t// Adds deep filtering\n\tif err := db.Use(deepgorm.New()); err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n\n```\n\n## 🔭 Plans\n\nBetter error handling, logging.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsurvivorbat%2Fgorm-deep-filtering","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsurvivorbat%2Fgorm-deep-filtering","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsurvivorbat%2Fgorm-deep-filtering/lists"}