{"id":18837887,"url":"https://github.com/olegfomenko/pg-dao","last_synced_at":"2026-02-01T04:32:44.854Z","repository":{"id":40350770,"uuid":"414978303","full_name":"olegfomenko/pg-dao","owner":"olegfomenko","description":"Data Access Object for PostgreSQL for Distributed Lab projects.","archived":false,"fork":false,"pushed_at":"2024-02-04T13:38:14.000Z","size":1653,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-10T17:57:02.614Z","etag":null,"topics":["distributed-lab","go","postgresql"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/olegfomenko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-08T12:28:51.000Z","updated_at":"2024-03-22T14:50:00.000Z","dependencies_parsed_at":"2024-02-04T14:35:59.993Z","dependency_job_id":"d86851e2-d58b-4d5e-b383-58832f63e478","html_url":"https://github.com/olegfomenko/pg-dao","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/olegfomenko/pg-dao","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olegfomenko%2Fpg-dao","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olegfomenko%2Fpg-dao/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olegfomenko%2Fpg-dao/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olegfomenko%2Fpg-dao/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/olegfomenko","download_url":"https://codeload.github.com/olegfomenko/pg-dao/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olegfomenko%2Fpg-dao/sbom","scorecard":{"id":704740,"data":{"date":"2025-08-11","repo":{"name":"github.com/olegfomenko/pg-dao","commit":"f3b749bc0ef877e175bf25aedf90dafc47a4fcb0"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.2,"checks":[{"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":-1,"reason":"no workflows found","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":-1,"reason":"No tokens found","details":null,"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":"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":0,"reason":"Found 2/21 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":"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":"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":"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":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"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":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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: goCommand not pinned by hash: vendor/github.com/pelletier/go-toml/benchmark.sh:10","Warn: goCommand not pinned by hash: vendor/github.com/pelletier/go-toml/benchmark.sh:11","Warn: goCommand not pinned by hash: vendor/github.com/pelletier/go-toml/test.sh:26","Warn: goCommand not pinned by hash: vendor/github.com/pelletier/go-toml/test.sh:27","Warn: goCommand not pinned by hash: vendor/github.com/pelletier/go-toml/test.sh:28","Warn: goCommand not pinned by hash: vendor/github.com/pelletier/go-toml/test.sh:29","Info:   0 out of   6 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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 12 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":"27 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2020-0001 / GHSA-6vm3-jj99-7229","Warn: Project is vulnerable to: GHSA-869c-j7wc-8jqv","Warn: Project is vulnerable to: GO-2021-0052 / GHSA-h395-qcrw-5vmq","Warn: Project is vulnerable to: GHSA-3vp4-m3rf-835h","Warn: Project is vulnerable to: GO-2023-1737 / GHSA-2c4m-59x9-fr2g","Warn: Project is vulnerable to: GO-2022-0272 / GHSA-jcxc-rh6w-wf49","Warn: Project is vulnerable to: GO-2021-0051 / GHSA-j453-hm5x-c46w","Warn: Project is vulnerable to: GO-2022-1031 / GHSA-crxj-hrmp-4rwf","Warn: Project is vulnerable to: GO-2022-0355 / GHSA-fx95-883v-4q4h","Warn: Project is vulnerable to: GO-2022-0493 / GHSA-p782-xgp4-8hr8","Warn: Project is vulnerable to: GO-2022-0209 / GHSA-r5c5-pr8j-pfp7","Warn: Project is vulnerable to: GO-2023-1992 / GHSA-x3jr-pf6g-c48f","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-0015 / GHSA-5rcv-m4m3-hfh7","Warn: Project is vulnerable to: GO-2021-0113 / GHSA-ppp9-7jff-5vj2","Warn: Project is vulnerable to: GO-2022-1059 / GHSA-69ch-w2m2-3vjp","Warn: Project is vulnerable to: GO-2021-0061 / GHSA-r88r-gmrh-7j83","Warn: Project is vulnerable to: GO-2022-0956 / GHSA-6q6q-88xp-6f2r","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-22T06:11:36.576Z","repository_id":40350770,"created_at":"2025-08-22T06:11:36.576Z","updated_at":"2025-08-22T06:11:36.576Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28967947,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T03:46:10.227Z","status":"ssl_error","status_checked_at":"2026-02-01T03:46:01.693Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["distributed-lab","go","postgresql"],"created_at":"2024-11-08T02:36:47.263Z","updated_at":"2026-02-01T04:32:44.839Z","avatar_url":"https://github.com/olegfomenko.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pg-dao\n\nData Access Object for PostgreSQL for Distributed Lab projects.\n\n## Usage\n\n```go\npackage main\n\nimport (\n\t\"errors\"\n\n\tpg \"github.com/olegfomenko/pg-dao\"\n\t\"gitlab.com/distributed_lab/kit/kv\"\n)\n\ntype Entry struct {\n\tId   int64  `db:\"id\" structs:\"-\"`\n\tName string `db:\"name\" structs:\"name\"`\n}\n\nfunc main() {\n\t// Loading config\n\tcfg := config.New(kv.MustFromEnv())\n\n\t// Creating DAO instance for table \"entries\"\n\tdao := pg.NewDAO(cfg.DB(), \"entries\")\n\n\t// Saving record\n\t// id - saved entry index\n\tid, err := dao.Create(Entry{\n\t\tName: \"First Entry\",\n\t})\n\n\t// Cloning DAO for new session\n\tdao = dao.Clone()\n\n\t// Cleaning queries in DAO in current session\n\tdao = dao.New()\n\n\t// Updating entry\n\terr = dao.UpdateWhereID(id).UpdateColumn(\"name\", \"New First Entry\").Update()\n\n\t// Getting entry by id\n\tvar entry Entry\n\t// if ok is false - there is no entry with provided id\n\tok, err := dao.New().FilterByID(id).Get(\u0026entry)\n\n\t// Getting entry by field\n\tok, err = dao.New().FilterByColumn(\"name\", \"New First Entry\").Get(\u0026entry)\n\n\t// Deleting entry\n\terr = dao.New().DeleteWhereID(id).Delete()\n\n\t// Creating transaction\n\terr = dao.Clone().TransactionSerializable(\n\t\tfunc(q pg.DAO) error {\n\t\t\tok, err := q.FilterByID(id).Get(\u0026entry)\n\t\t\tif err != nil {\n\t\t\t\t// rollback transaction\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\tif !ok {\n\t\t\t\t// entry does not exist\n\t\t\t\treturn errors.New(\"not found\")\n\t\t\t}\n\n\t\t\terr = q.New().UpdateWhereID(id).UpdateColumn(\"name\", \"Updated First Entry\").Update()\n\t\t\tif err != nil {\n\t\t\t\t// rollback transaction\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\t// commit transaction\n\t\t\treturn nil\n\t\t},\n\t)\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folegfomenko%2Fpg-dao","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Folegfomenko%2Fpg-dao","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folegfomenko%2Fpg-dao/lists"}