{"id":36426551,"url":"https://github.com/derekmorr/refined-anorm","last_synced_at":"2026-01-11T18:01:03.620Z","repository":{"id":57719707,"uuid":"84363339","full_name":"derekmorr/refined-anorm","owner":"derekmorr","description":"Refined support for Anorm","archived":false,"fork":false,"pushed_at":"2017-11-04T13:43:56.000Z","size":21,"stargazers_count":2,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-12T07:43:51.937Z","etag":null,"topics":["anorm","database","refined","scala"],"latest_commit_sha":null,"homepage":null,"language":"Scala","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/derekmorr.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":"2017-03-08T20:30:42.000Z","updated_at":"2019-05-04T16:08:10.000Z","dependencies_parsed_at":"2022-09-09T03:01:27.094Z","dependency_job_id":null,"html_url":"https://github.com/derekmorr/refined-anorm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/derekmorr/refined-anorm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derekmorr%2Frefined-anorm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derekmorr%2Frefined-anorm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derekmorr%2Frefined-anorm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derekmorr%2Frefined-anorm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/derekmorr","download_url":"https://codeload.github.com/derekmorr/refined-anorm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derekmorr%2Frefined-anorm/sbom","scorecard":{"id":335279,"data":{"date":"2025-08-11","repo":{"name":"github.com/derekmorr/refined-anorm","commit":"0740f815d7b8effcc886ba1ba32c3cd94056f11a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 1/26 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":"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":"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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"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":"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":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 2 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-18T04:35:26.030Z","repository_id":57719707,"created_at":"2025-08-18T04:35:26.030Z","updated_at":"2025-08-18T04:35:26.030Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28316893,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T14:58:17.114Z","status":"ssl_error","status_checked_at":"2026-01-11T14:55:53.580Z","response_time":60,"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":["anorm","database","refined","scala"],"created_at":"2026-01-11T18:00:27.222Z","updated_at":"2026-01-11T18:01:03.609Z","avatar_url":"https://github.com/derekmorr.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Refined Anorm\n\nAdds support for [Refinement types](https://github.com/fthomas/refined) to the \n[Anorm](https://github.com/playframework/anorm) database access layer for Scala.\n\n[![Build Status](https://travis-ci.org/derekmorr/refined-anorm.svg?branch=master)](https://travis-ci.org/derekmorr/refined-anorm)\n\n# Installation #\n\nAdd the following to your `build.sbt`:\n\n``` scala\nlibraryDependencies += \"com.github.derekmorr\" %% \"refined-anorm\" % \"0.1\"\n```\n\n`refined-anorm` is available for Scala 2.11 and 2.12 for Anorm 2.5.\n\n# Usage\n\nAdd the following to Anorm models:\n\n```scala\nimport refined.anorm._\n```\n\nThen you'll be able to serialize and deserialize refined types with JDBC.\n\nFor example:\n\n```scala\n/** 802.1Q Vlan ID */\ntype VlanId = Int Refined Interval.Closed[W.`0`.T, W.`4095`.T]\n\ntype NonBlankString = String Refined And[NonEmpty, Exists[Not[Whitespace]]]\n\ncase class Vlan(id: VlanId, name: NonBlankString)\n\nobject Vlan {\n   import refined.anorm._\n   val parser: RowParser[Vlan] = Macro.namedParser[Vlan]\n  \n  def getById(id: VlanId)(implicit connection: Connection): Option[Vlan] = {\n    SQL\"\"\"SELECT id, name FROM vlans WHERE id = $id\"\"\".as(Vlan.parser.singleOpt)\n  }\n \n  def create(vlan: Vlan)(implicit connection: Connection): Boolean = {\n    SQL\"\"\"INSERT INTO vlans (id, name) VALUES (${vlan.id}, ${vlan.name})\"\"\".executeUpdate() == 1\n  }\n}\n```\n\nThere is a complete, working example in the integration tests (in `src/it`).\n\n\n\n# Testing the app\n\nTo run unit tests, run\n\n    sbt test\nTo run the integration tests:\n\n1.  Install a database (PostgreSQL is the default).\n2.  Create a database named `refinement`. Grant a user read/write and `create table` access to it.\n3.  Edit `src/it/resources/application.conf`:\n   1. Edit the `username` and `password` fields\n   2. Adjust the database URL if necessary.\n4.  Run `sbt it:test`\n\n\n\n# Code coverage report\n\nTo generate a code coverage report run,\n\n    sbt clean coverage test coverageReport\n\nThe HTML report will be written to `target/scala-2.12/scoverage-report/index.html`.\n\n# Code quality analysis\n\nThe project uses the [scapegoat tool](https://github.com/sksamuel/scapegoat) for code quality analysis.\nRun run a scapegoat report, run\n\n    sbt scapegoat\n\nThe HTML report will be written to `target/scala-2.12/scapegoat-report/scapegoat.html`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderekmorr%2Frefined-anorm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fderekmorr%2Frefined-anorm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderekmorr%2Frefined-anorm/lists"}