Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/evolution-gaming/scassandra
Cassandra client in scala
https://github.com/evolution-gaming/scassandra
cassandra cats cats-effect client scala
Last synced: about 1 month ago
JSON representation
Cassandra client in scala
- Host: GitHub
- URL: https://github.com/evolution-gaming/scassandra
- Owner: evolution-gaming
- License: mit
- Created: 2018-10-19T17:55:53.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-09-09T16:37:17.000Z (4 months ago)
- Last Synced: 2024-09-09T20:30:55.057Z (4 months ago)
- Topics: cassandra, cats, cats-effect, client, scala
- Language: Scala
- Size: 274 KB
- Stars: 14
- Watchers: 8
- Forks: 7
- Open Issues: 29
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Scassandra
[![Build Status](https://github.com/evolution-gaming/scassandra/workflows/CI/badge.svg)](https://github.com/evolution-gaming/scassandra/actions?query=workflow%3ACI)
[![Coverage Status](https://coveralls.io/repos/github/evolution-gaming/scassandra/badge.svg?branch=master)](https://coveralls.io/github/evolution-gaming/scassandra?branch=master)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/0d7a08d9bb95457f95cded06e8c2177c)](https://app.codacy.com/gh/evolution-gaming/scassandra/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[![Version](https://img.shields.io/badge/version-click-blue)](https://evolution.jfrog.io/artifactory/api/search/latestVersion?g=com.evolutiongaming&a=scassandra_2.13&repos=public)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellowgreen.svg)](https://opensource.org/licenses/MIT)### Cassandra client in scala - wrapper over java client
## Example
```scala
import com.evolutiongaming.scassandra._val config = CassandraConfig.Default
val session = for {
cluster <- CassandraCluster.of[IO](config, clusterId = 0)
session <- cluster.connect
} yield sessionval name = for {
resultSet <- session.use { session => session.execute("SELECT name FROM users") }
} yield {
val row = resultSet.one()
row.decode[String]("name")
}name.unsafeRunSync()
```## Setup
```scala
addSbtPlugin("com.evolution" % "sbt-artifactory-plugin" % "0.0.2")libraryDependencies += "com.evolutiongaming" %% "scassandra" % "3.2.1"
```