{"id":15056649,"url":"https://github.com/nmoncho/helenus3","last_synced_at":"2025-08-23T06:05:09.871Z","repository":{"id":254582598,"uuid":"822574113","full_name":"nMoncho/helenus3","owner":"nMoncho","description":"An Apache Cassandra Client for Scala 3 inspired by Anorm and Quill","archived":false,"fork":false,"pushed_at":"2025-08-02T06:41:07.000Z","size":333,"stargazers_count":12,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-02T09:05:04.122Z","etag":null,"topics":["akka-streams","cassandra","client","database","flink","pekko-streams","reactive","reactive-streams","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/nMoncho.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,"zenodo":null}},"created_at":"2024-07-01T12:03:52.000Z","updated_at":"2025-08-02T06:41:11.000Z","dependencies_parsed_at":"2024-08-24T14:47:03.945Z","dependency_job_id":"4939ad31-34e7-4715-9534-b2d0f8198291","html_url":"https://github.com/nMoncho/helenus3","commit_stats":{"total_commits":70,"total_committers":2,"mean_commits":35.0,"dds":0.3285714285714286,"last_synced_commit":"191d0b0155196957860f2c659840a19bea34be74"},"previous_names":["nmoncho/helenus3"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/nMoncho/helenus3","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nMoncho%2Fhelenus3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nMoncho%2Fhelenus3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nMoncho%2Fhelenus3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nMoncho%2Fhelenus3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nMoncho","download_url":"https://codeload.github.com/nMoncho/helenus3/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nMoncho%2Fhelenus3/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271745662,"owners_count":24813515,"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-08-23T02:00:09.327Z","response_time":69,"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":["akka-streams","cassandra","client","database","flink","pekko-streams","reactive","reactive-streams","scala"],"created_at":"2024-09-24T21:54:39.412Z","updated_at":"2025-08-23T06:05:09.862Z","avatar_url":"https://github.com/nMoncho.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg align=\"left\" width=\"64px\" height=\"64px\" src=\"docs/logo.svg\"/\u003e\n\n# Helenus\n\n---\n\n![main status](https://github.com/nMoncho/helenus/actions/workflows/main.yaml/badge.svg)\n[![Maven Central 3](https://maven-badges.herokuapp.com/maven-central/net.nmoncho/helenus-core_3/badge.svg)](https://maven-badges.herokuapp.com/maven-central/net.nmoncho/helenus-core_3)\n\nHelenus is collection of Scala utilities for Apache Cassandra. Its goal is to\nmake interacting with Cassandra easier, in a type-safe manner, while trying to\navoid introducing a complex API.\n\nWe also provide integration against several streaming libraries:\n\n- Akka v2.6 (Apache License)\n- Akka BUSL\n- Flink (Experimental)\n- Pekko\n\nThis is the Scala 3 version of Helenus. For Scala 2, go [here](https://github.com/nMoncho/helenus).\n\n## Installation\n\nInclude the library into you project definition:\n\n```scala\nlibraryDependencies += \"net.nmoncho\" %% \"helenus-core\" % \"1.1.1\"\n```\n\n## Motivation\n\nWe tried using libraries such as [Phantom](https://outworkers.github.io/phantom/) and [Quill](https://github.com/zio/zio-quill),\nwhich are great by the way, but they didn't fit entirely our mindset of workflow.\nWe believe the best way to use Cassandra,  or any DB for that matter, is to use its\nQuery Language directly.\n\nHelenus takes inspiration from libraries such as [Anorm](https://github.com/playframework/anorm), trying to provide a\nsimilar experience by putting CQL first. Our goals are:\n\n- Give users control over the queries that are actually executed.\n- Keep the library simple with a concise API.\n\n## Features\n\n - `TypeCodec`s for Scala types. Every type extending `AnyVal`, most Scala Collections, Scala `Enumeration`, etc.\n   - Codecs for [UDTs](https://docs.datastax.com/en/cql-oss/3.3/cql/cql_using/useCreateUDT.html) defined as Case Classes.\n   - Codecs for [Tuples](https://docs.datastax.com/en/cql-oss/3.3/cql/cql_using/useCreateTableTuple.html) defined with Scala Tuples.\n - CQL templating, with String Interpolation. See [usage](#usage).\n - `PreparedStatement`s and `BoundStatement`s extension methods\n\n### Supported Codecs\n\nAs of this version, Helenus supports the following types:\n\n- Java types: `String`, `UUID`, `Instant`, `LocalDate`, `LocalTime`, `InetAddress`.\n- `AnyVal` types: `Boolean`, `Byte`, `Double`, `Float`, `Int`, `Long`, `Short`.\n  - This means, if used properly, no more boxing.\n- Collections: `Seq`, `List`, `Vector`, `Map`, `Set`, `SortedMap`, `SortedSet`.\n  - If you need a codec that isn't provided out of the box, please read [this guide](https://github.com/nMoncho/helenus/wiki/Codecs#where-is-the-typecodec-for-x-collection) on how to add it.\n- Enumerations: Can be encoded by name or by order. See [Enumeration Codecs](#enumeration-codecs).\n- Tuples: Encoded as regular Cassandra tuples\n- Case Classes: Encoded as regular Cassandra UDTs\n- Others: `Option`, and `Either` (encoded as a tuple).\n\n\n## Usage\n\n\n```scala\n// First import helenus...\nimport net.nmoncho.helenus.*\n\n// Then mark your session implicit\ngiven CqlSession = getSession\n\n// We can derive Cassandra TypeCodecs used to map UDTs to case classes\ncase class Address(\n  street: String,\n  city: String,\n  stateOrProvince: String,\n  postalCode: String,\n  country: String\n) derives UDTCodec\n\n// We can derive how query results map to case classes\ncase class Hotel(\n  id: String,\n  name: String,\n  phone: String,\n  address: Address,\n  pois: Set[String]\n) derives RowMapper\n\nval hotelId = \"h1\"\n// hotelId: String = \"h1\"\n\n// We can prepare queries with parameters that don't require boxing\nval hotelsById = \"SELECT * FROM hotels WHERE id = ?\".toCQL\n    .prepare[String]\n    .as[Hotel]\n// hotelsById: ScalaPreparedStatement1[String, Hotel] = net.nmoncho.helenus.internal.cql.ScalaPreparedStatement1@12452034\n\n// We can extract a single result using `nextOption()`, or\n// use `to(Coll)` to transform the result to a collection\nhotelsById.execute(\"h1\").nextOption()\n// res0: Option[Hotel] = Some(\n//   value = Hotel(\n//     id = \"h1\",\n//     name = \"The New York Hotel Rotterdam\",\n//     phone = \"+31 10 217 3000\",\n//     address = Address(\n//       street = \"Meent 78-82\",\n//       city = \"Rotterdam\",\n//       stateOrProvince = \"Zuid-Holland\",\n//       postalCode = \"3011 JM\",\n//       country = \"Netherlands\"\n//     ),\n//     pois = Set(\"Erasmus Bridge\", \"Markthal Rotterdam\", \"Rotterdam Zoo\")\n//   )\n// )\n\n// We can also run the same using CQL interpolated queries\nval interpolatedHotelsById = cql\"SELECT * FROM hotels WHERE id = $hotelId\"\n// interpolatedHotelsById: WrappedBoundStatement[Row] = net.nmoncho.helenus.api.cql.WrappedBoundStatement@5b46c527\n\ninterpolatedHotelsById.as[Hotel].execute().nextOption()\n// res1: Option[Hotel] = Some(\n//   value = Hotel(\n//     id = \"h1\",\n//     name = \"The New York Hotel Rotterdam\",\n//     phone = \"+31 10 217 3000\",\n//     address = Address(\n//       street = \"Meent 78-82\",\n//       city = \"Rotterdam\",\n//       stateOrProvince = \"Zuid-Holland\",\n//       postalCode = \"3011 JM\",\n//       country = \"Netherlands\"\n//     ),\n//     pois = Set(\"Erasmus Bridge\", \"Markthal Rotterdam\", \"Rotterdam Zoo\")\n//   )\n// )\n```\n\nFor a more detailed guide on how to use Helenus, please read our [wiki](https://github.com/nMoncho/helenus3/wiki). We also provide\n[example projects](https://github.com/nMoncho/helenus3-examples).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnmoncho%2Fhelenus3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnmoncho%2Fhelenus3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnmoncho%2Fhelenus3/lists"}