{"id":15350071,"url":"https://github.com/takezoe/scala-jdbc","last_synced_at":"2025-09-12T12:36:18.469Z","repository":{"id":57723487,"uuid":"59260551","full_name":"takezoe/scala-jdbc","owner":"takezoe","description":"Better JDBC wrapper for Scala","archived":false,"fork":false,"pushed_at":"2022-09-10T12:51:59.000Z","size":80,"stargazers_count":24,"open_issues_count":0,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-07-07T15:54:19.039Z","etag":null,"topics":["database","jdbc","scala","sql"],"latest_commit_sha":null,"homepage":null,"language":"Scala","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/takezoe.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}},"created_at":"2016-05-20T03:03:49.000Z","updated_at":"2024-07-04T08:55:45.000Z","dependencies_parsed_at":"2023-01-18T02:50:23.012Z","dependency_job_id":null,"html_url":"https://github.com/takezoe/scala-jdbc","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/takezoe/scala-jdbc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takezoe%2Fscala-jdbc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takezoe%2Fscala-jdbc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takezoe%2Fscala-jdbc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takezoe%2Fscala-jdbc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/takezoe","download_url":"https://codeload.github.com/takezoe/scala-jdbc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takezoe%2Fscala-jdbc/sbom","scorecard":{"id":866423,"data":{"date":"2025-08-11","repo":{"name":"github.com/takezoe/scala-jdbc","commit":"d01cbe980bf1ee953fea2420c5bebb1fb58cbda1"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.1,"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":"Code-Review","score":0,"reason":"Found 0/23 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":"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":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/takezoe/scala-jdbc/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/takezoe/scala-jdbc/main.yml/master?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":"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":"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/main.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":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":"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":"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 10 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-24T02:47:10.246Z","repository_id":57723487,"created_at":"2025-08-24T02:47:10.246Z","updated_at":"2025-08-24T02:47:10.246Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274814492,"owners_count":25355080,"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-12T02:00:09.324Z","response_time":60,"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","jdbc","scala","sql"],"created_at":"2024-10-01T11:57:02.034Z","updated_at":"2025-09-12T12:36:18.410Z","avatar_url":"https://github.com/takezoe.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# scala-jdbc [![Actions Status](https://github.com/takezoe/scala-jdbc/workflows/CI/badge.svg)](https://github.com/takezoe/scala-jdbc/actions) [![scala-jdbc Scala version support](https://index.scala-lang.org/takezoe/scala-jdbc/scala-jdbc/latest-by-scala-version.svg?platform=jvm)](https://index.scala-lang.org/takezoe/scala-jdbc/scala-jdbc)\n\nBetter JDBC wrapper for Scala.\n\n```scala\nlibraryDependencies += \"com.github.takezoe\" %% \"scala-jdbc\" % \"1.0.5\"\n```\n\nYou can use better-jdbc by adding a following import statements:\n\n```scala\nimport com.github.takezoe.scala.jdbc._\n```\n\n## Select\n\nExtract values from `ResultSet`:\n\n```scala\nval users: Seq[(Int, String)] = DB.autoClose(conn) { db =\u003e\n  db.select(\"SELECT * FROM USERS\"){ rs =\u003e\n    (rs.getInt(\"USER_ID\"), rs.getString(\"USER_NAME\"))\n  }\n}\n```\n\nRetrieve a first record:\n\n```scala\nval user: Option[(Int, String)] = DB.autoClose(conn) { db =\u003e\n  db.selectFirst(sql\"SELECT * FROM USERS WHERE USER_ID = $userId\"){ rs =\u003e\n    (rs.getInt(\"USER_ID\"), rs.getString(\"USER_NAME\"))\n  }\n}\n```\n\nMap `ResultSet` to the case class:\n\n```scala\ncase class User(userId: Int, userName: String)\n\nval users: Seq[User] = DB.autoClose(conn) { db =\u003e\n  db.select(\"SELECT USER_ID, USER_NAME FROM USERS\", User.apply _)\n}\n```\n\n## Update\n\n```scala\nDB.autoClose(conn) { db =\u003e\n  db.update(sql\"INSERT INTO USERS (USER_ID, USER_NAME) VALUES ($userId, $userName)\")\n}\n```\n\n## Transaction\n\n```scala\nDB.autoClose(conn) { db =\u003e\n  db.transaction {\n    db.update(sql\"DELETE FROM GROUP WHERE USER_ID = $userId\")\n    db.update(sql\"DELETE FROM USERS WHERE USER_ID = $userId\")\n  }\n}\n```\n\n## Large data\n\nProcess large data using `scan` method:\n\n```scala\nDB.autoClose(conn) { db =\u003e\n  db.scan(\"SELECT * FROM USERS\"){ rs =\u003e\n    println(rs.getString(\"USER_NAME\"))\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftakezoe%2Fscala-jdbc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftakezoe%2Fscala-jdbc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftakezoe%2Fscala-jdbc/lists"}