{"id":39519681,"url":"https://github.com/nzmprlr/sqlpp","last_synced_at":"2026-01-18T06:17:50.799Z","repository":{"id":57622897,"uuid":"395416773","full_name":"nzmprlr/sqlpp","owner":"nzmprlr","description":"A database connection wrapper to cache prepared statements by transforming queries to use with array arguments.","archived":false,"fork":false,"pushed_at":"2021-09-22T20:07:16.000Z","size":11,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-20T05:29:07.964Z","etag":null,"topics":["database","go","golang","mysql","postgresql","sql","wrapper"],"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/nzmprlr.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":"2021-08-12T18:56:16.000Z","updated_at":"2022-02-09T12:47:46.000Z","dependencies_parsed_at":"2022-08-26T23:51:24.186Z","dependency_job_id":null,"html_url":"https://github.com/nzmprlr/sqlpp","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/nzmprlr/sqlpp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nzmprlr%2Fsqlpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nzmprlr%2Fsqlpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nzmprlr%2Fsqlpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nzmprlr%2Fsqlpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nzmprlr","download_url":"https://codeload.github.com/nzmprlr/sqlpp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nzmprlr%2Fsqlpp/sbom","scorecard":{"id":700179,"data":{"date":"2025-08-11","repo":{"name":"github.com/nzmprlr/sqlpp","commit":"61a2177eed9311d3a9e09542f4d2651e10256a2d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.7,"checks":[{"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":"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":"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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Code-Review","score":0,"reason":"Found 0/6 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":"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/go.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/nzmprlr/sqlpp/go.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/nzmprlr/sqlpp/go.yml/main?enable=pin","Info:   0 out of   2 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":"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":"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":"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":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2022-0603 / GHSA-hp87-p4gw-j4gq"],"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-22T05:02:21.324Z","repository_id":57622897,"created_at":"2025-08-22T05:02:21.324Z","updated_at":"2025-08-22T05:02:21.324Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28531993,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"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":["database","go","golang","mysql","postgresql","sql","wrapper"],"created_at":"2026-01-18T06:17:50.342Z","updated_at":"2026-01-18T06:17:50.780Z","avatar_url":"https://github.com/nzmprlr.png","language":"Go","readme":"# sqlpp [![GoDoc](https://godoc.org/github.com/nzmprlr/sqlpp?status.svg)](http://godoc.org/github.com/nzmprlr/sqlpp) [![Go Report Card](https://goreportcard.com/badge/github.com/nzmprlr/sqlpp)](https://goreportcard.com/report/github.com/nzmprlr/sqlpp) [![Coverage](http://gocover.io/_badge/github.com/nzmprlr/sqlpp)](http://gocover.io/github.com/nzmprlr/sqlpp)\n\nsqlpp is a sql(`MySQL and PostgreSQL`) database connection wrapper to cache prepared statements by transforming queries (`\"...in (?)...\", []`) to use with array arguments.\n\n## Query Transformation\n### Given query:\n `select * from bar where b = ? or a in (?) or b = ? or b in (?)` \n ### With args: \n `db.Args(1, []int{2,3}, 4, []string{\"5\", \"6\", \"7\"})` \n \n ### Will transform to:\n MySQL =\u003e `select * from bar where b = ? or a in (?,?) or b = ? or b in (?,?,?)`\u003cbr\u003e PostgreSQL =\u003e `select * from bar where b = $1 or a in ($2,$3) or b = $4 or b in ($5,$6,$7)`\n ### With args:\n `[]interface{}{1, 2, 3, 4, \"5\", \"6\", \"7\"}`\n\u003cbr\u003e\n## Usage\n\n``` go\n/* conn, _ := sql.Open(\"mysql\", \"username:password@tcp(host:port)/database\")\ndb := sqlpp.NewMySQL(conn) */\nconn, _ := sql.Open(\"postgres\", \"postgres://username:password@host:port/database?sslmode=disable\")\ndb := sqlpp.NewPostgreSQL(conn)\n\ndefer db.Close()\n\nerr = db.Ping()\nif err != nil {\n    panic(err)\n}\n\nr, _ := db.Query(\"select * from foo\", nil, func(r *sql.Rows) (interface{}, error) {\n    var a int\n    err := r.Scan(\u0026a)\n    return a, err\n})\n\nfmt.Println(r)\n// output: [1,2,3,4]\n\nr, _ = db.Query(\"select * from foo where id = ?\", db.Args(1), func(r *sql.Rows) (interface{}, error) {\n    var a int\n    err := r.Scan(\u0026a)\n    return a, err\n})\n\nfmt.Println(r)\n// output: [1]\n\n\nr, _ = db.Query(\"select * from foo where id in (?)\", db.Args([]int{2,3}), func(r *sql.Rows) (interface{}, error) {\n    var a int\n    err := r.Scan(\u0026a)\n    return a, err\n})\n\nfmt.Println(r)\n// output: [2,3]\n```\n\n## License\n\nThe MIT License (MIT). See [License File](LICENSE) for more information.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnzmprlr%2Fsqlpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnzmprlr%2Fsqlpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnzmprlr%2Fsqlpp/lists"}