{"id":27134789,"url":"https://github.com/mideo/cassandra-connector4s","last_synced_at":"2025-09-15T08:07:05.205Z","repository":{"id":57727870,"uuid":"171173046","full_name":"MideO/cassandra-connector4s","owner":"MideO","description":"simple scala cassandra client","archived":false,"fork":false,"pushed_at":"2019-05-21T22:05:53.000Z","size":126,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-12T16:27:46.017Z","etag":null,"topics":["cassandra-client","cassandra-connector4s","cassandra-database","cassandra-driver","cassandra-migration","cql","cqlmigrate","embedded-cassandra","jar","non-blocking","scala"],"latest_commit_sha":null,"homepage":"","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/MideO.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":"2019-02-17T21:12:35.000Z","updated_at":"2020-08-05T22:02:42.000Z","dependencies_parsed_at":"2022-08-30T08:32:01.872Z","dependency_job_id":null,"html_url":"https://github.com/MideO/cassandra-connector4s","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/MideO/cassandra-connector4s","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MideO%2Fcassandra-connector4s","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MideO%2Fcassandra-connector4s/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MideO%2Fcassandra-connector4s/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MideO%2Fcassandra-connector4s/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MideO","download_url":"https://codeload.github.com/MideO/cassandra-connector4s/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MideO%2Fcassandra-connector4s/sbom","scorecard":{"id":93933,"data":{"date":"2025-08-11","repo":{"name":"github.com/MideO/cassandra-connector4s","commit":"ac305cc00e499947beae8bbd12714103421be94c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"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/30 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":"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":"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":"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":"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":"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":"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":"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":"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"}}]},"last_synced_at":"2025-08-15T08:29:13.875Z","repository_id":57727870,"created_at":"2025-08-15T08:29:13.876Z","updated_at":"2025-08-15T08:29:13.876Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275225879,"owners_count":25427009,"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-15T02:00:09.272Z","response_time":75,"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":["cassandra-client","cassandra-connector4s","cassandra-database","cassandra-driver","cassandra-migration","cql","cqlmigrate","embedded-cassandra","jar","non-blocking","scala"],"created_at":"2025-04-08T00:59:16.815Z","updated_at":"2025-09-15T08:07:05.184Z","avatar_url":"https://github.com/MideO.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"## cassandra-connector\n[![Build Status](https://travis-ci.org/MideO/cassandra-connector4s.svg?branch=master)](https://travis-ci.org/MideO/cassandra-connector4s)\n\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.mideo/cassandra-connector4s_2.12/badge.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.github.mideo%22%20a%3A%22cassandra-connector4s_2.12%22)\n## Cassandra DB bundle to enable \n* Connection to cassandra\n* Connection to cassandra embedded cassadra for testing\n* Generic materialised repository \n* Managing migrations with [Cqlmigrate](https://github.com/sky-uk/cqlmigrate#what-it-does)\n\n##### Docs?\n  See Integration tests: [IntegrationTests.scala](src/test/scala/com/github/mideo/cassandra/testing/support/IntegrationTests.scala)\n  \n#### Uage\n\n##### Create cassandra-connector.conf in resources directory\n```bash\ncassandra-connector {\n  cluster {\n    username: user\n    password: pass\n    keyspace: cassandra_connector\n    port: 9402\n    contactPoints: localhost\n    dc: DC1\n  }\n  session {\n    consistencyLevel: local_quorum\n  }\n}\n```\n##### Define a repository\n```scala\n\n@Table(keyspace = \"cassandra_connector\", name = \"users\", caseSensitiveKeyspace = false, caseSensitiveTable = false)\nclass User() {\n  @PartitionKey\n  @Column(name = \"user_id\")\n  @BeanProperty var userId: UUID = _\n  @BeanProperty var name: String = _\n\n  // Define auxiliary constructor due to cassandra driver limitation i.e. using reflection \n  def this(userId: UUID, name: String) = {\n    this()\n    this.userId = userId\n    this.name = name\n  }\n}\n```\n\n##### Define a customer Repository Accessor\n```scala\n@Accessor trait TestUserAccessor {\n  @Query(\"SELECT * FROM users\") def getAll: Result[TestUser]\n  @Query(\"TRUNCATE users\") def truncate: Result[TestUser]\n}\n\n```\n\n##### Perform CRUD Ops\n```scala\n// Either Create a connected Keyspace from the above config without cql migration\nval connectedKeyspace = ConnectedKeyspace(\"cassandra_connector\")\n\n// or with cql migration if needed\nval connectedKeyspace = ConnectedKeyspace(\"cassandra_connector\", \"aGivenDirectoryWithDotCqlFiles\")\n\n\n//Or alternatively, initialise without config file\nimport com.github.mideo.cassandra.connector.fluent.Connector\n\nval connectedKeyspace = Connector.keyspace(\"keyspace\" )\n      .withUserName(\"mideo\")\n      .withPassword(\"password\")\n      .withConsistencyLevel(ConsistencyLevel.LOCAL_QUORUM)\n      .withContactPoints(List(\"localhost\"))\n      .onPort(9402)\n      .withDC(\"DC1\")\n      .withMigrationsDirectory(\"aGivenDirectoryWithDotCqlFiles\")\n      .connect()\n\n\n// create a connectedTable\nval futureTable: Future[ConnectedTable[TestUser, TestUserAccessor]] = connectedKeyspace.materialise[TestUser, TestUserAccessor]\n\n\n futureTable map {\n      table =\u003e table.accessor.truncate\n                table.mapper.save(new User(UUID.randomUUID, \"mideo\"))\n                table.accessor.getAll\n      } \n\n// alternatively create a repository\nval userMapper: Future[Mapper[TestUser]] = connectedKeyspace.materialise[TestUser]\n\n// Create an instance of repository entity\nval mideo = new User(UUID.randomUUID, \"mideo\")\n\n// Create an instance of repository entity\nuserMapper.map { _.save(mideo) }\n\n// Get user\nuserMapper.map { _.get(mideo.userId) }\n\n\n// Delete user\nuserMapper.map { _.delete(mideo.userId) }\n\n\n// alternatively  user custom accessor\nval accessor: Future[TestUserAccessor] = connectedKeyspace.materialiseAccessor[TestUserAccessor]\n\naccessor.map { _.getAll }\n\naccessor.map { _.truncate }\n\n\n```\n\n##### Testing with [EmbeddedCassandra](https://github.com/jsevellec/cassandra-unit)\n\n```scala\n// Connect with the ConnectedInMemoryRepository object\nval connectedKeyspace: ConnectedKeyspace = ConnectedInMemoryKeyspace(\"cassandra_connector\")\n\nval isRunning = EmbeddedCassandra.isRunning \n\nval port = EmbeddedCassandra.runningPort \n\nval hosts = EmbeddedCassandra.getHosts \n\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmideo%2Fcassandra-connector4s","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmideo%2Fcassandra-connector4s","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmideo%2Fcassandra-connector4s/lists"}