Popularity
3.7
Declining
Activity
0.0
Stable
100
12
23
Programming language: Scala
License: GNU General Public License v3.0 or later
Tags:
Database
Latest version: v0.4.9
rethink-scala alternatives and similar packages
Based on the "Database" category.
Alternatively, view rethink-scala alternatives based on common mentions on social networks and blogs.
-
Slick
Slick (Scala Language Integrated Connection Kit) is a modern database query and access library for Scala -
Elastic4s
Elasticsearch Scala Client - Reactive, Non Blocking, Type Safe, HTTP Client -
PostgreSQL and MySQL async
Async database drivers to talk to PostgreSQL and MySQL in Scala. -
ScalikeJDBC
A tidy SQL-based DB access library for Scala developers. This library naturally wraps JDBC APIs and provides you easy-to-use APIs. -
scala-redis
A scala library for connecting to a redis server, or a cluster of redis nodes using consistent hashing on the client side. -
Phantom
Schema safe, type-safe, reactive Scala driver for Cassandra/Datastax Enterprise -
ReactiveMongo
:leaves: Non-blocking, Reactive MongoDB Driver for Scala -
rediscala
Non-blocking, Reactive Redis driver for Scala (with Sentinel support) -
Squeryl
A Scala DSL for talking with databases with minimum verbosity and maximum type safety -
mongo-scala-driver
A modern idiomatic MongoDB Scala Driver. -
Scala ActiveRecord
ActiveRecord-like ORM library for Scala -
SwayDB
Persistent and in-memory key-value storage engine for JVM that scales on a single machine. -
Pulsar4s
Idiomatic, typesafe, and reactive Scala client for Apache Pulsar -
#<Sawyer::Resource:0x00007f161059a678>
Strong type constraints for Scala -
scredis
Non-blocking, ultra-fast Scala Redis client built on top of Akka IO, used in production at Livestream -
Scala-Forklift
Type-safe data migration tool for Slick, Git and beyond. -
AnormCypher
Neo4j Scala library based on Anorm in the Play Framework -
neotypes
Scala lightweight, type-safe, asynchronous driver for neo4j -
Scruid
Scala + Druid: Scruid. A library that allows you to compose queries in Scala, and parse the result back into typesafe classes. -
Clickhouse-scala-client
Clickhouse Scala Client with Reactive Streams support -
Tepkin
Reactive MongoDB Driver for Scala built on top of Akka IO and Akka Streams. -
Couchbase
The Couchbase Monorepo for JVM Clients: Java, Scala, io-core… -
ScalaRelational
Type-Safe framework for defining, modifying, and querying SQL databases -
ReactiveNeo
[DISCONTINUED] Reactive type-safe Scala driver for Neo4J -
lucene4s
Light-weight convenience wrapper around Lucene to simplify complex tasks and add Scala sugar. -
GCP Datastore Akka Persistence Plugin
akka-persistence-gcp-datastore is a journal and snapshot store plugin for akka-persistence using google cloud firestore in datastore mode.
Access the most powerful time series database as a service
Ingest, store, & analyze all types of time series data in a fully-managed, purpose-built database. Keep data forever with low-cost storage and superior data compression.
Promo
www.influxdata.com
Do you think we are missing an alternative of rethink-scala or a related project?
README
Scala Rethinkdb Driver
Work in progress for RethinkDB 2.0 release.
FEATURES
- Full Type Safety (still a work in progress, will use macros to support case class type safety, right now all queries should be typed checked against the rules of RQL, )
- Mapping to and from case classes , this allows you to fetch data to an case class via .as[CaseClass] or insert data from case classes (will be translated to a Map[String,_]
- Lazy evaluation, all expressions are evaluated in a lazy fashion, meaning that the ast will be build up but the inner
args
andoptargs
wont be resolved until .run/.as or .ast is called for performance. - Importing com.rethinkscala.Implicits._ will give you a more normal way to construct your rql so you can write normal scala code without worrying about casting in a
Typed
or viaExpr
- Uses Jackson for json mapping via jackson-module-scala
Guide
TODO
- Complete Test Suite
- Fix compile warns
- Allow type safety for
Predicate
classes via macros
SBT Users
val main = Project(....).settings(resolvers ++= Seq("RethinkScala Repository" at "http://kclay.github.io/releases"))
val rethinkscala = "com.rethinkscala" %% "core" % "0.5.0",
val rethinkscala = "com.rethinkscala" %% "core" % "0.5.1-SNAPSHOT"
To get started
import com.rethinkscala.Blocking._ // for blocking api
implicit val blockingConnection = Blocking(Version3)
import com.rethinkscala.Async._ // for async api
implicit val asyncConnection = Async(Version3)
Examples
scala> r.table("marvel").map(hero=> hero \ "combatPower" + hero \ "combatPower" * 2)
res2: com.rethinkscala.ast.RMap = RMap(Table(marvel,None,None),Predicate1(<function1>))
scala> import com.rethinkscala._
import com.rethinkscala._
scala> val version =new Version3("172.16.2.45")
version: com.rethinkscala.net.Version3 = Version3(172.16.2.45,28015,None,5)
scala> implicit val connection = new Connection(version)
connection: com.rethinkscala.Connection = Connection(Version2(172.16.2.45,28015,None,5))
scala> val info =DB("foo").table("bar").info
info: com.rethinkscala.ast.Info = Info(Table(bar,Some(false),Some(DB(foo))))
//case class DBResult(name: String, @JsonProperty("type") kind: String) extends Document
//case class TableInfoResult(name: String, @JsonProperty("type") kind: String, db: DBResult) extends Document
scala> val result = info.as[TableInfoResult]
result: Either[com.rethinkscala.net.RethinkError,com.rethinkscala.net.TableInfoResult] = Right(TableInfoResult(bar,TABLE,DBResult(test,DB)))
// selecting data
scala> r.db("test").table("foos").create.run
res1: Either[com.rethinkscala.net.RethinkError,Boolean] = Right(true)
scala> val table = r.db("test").table("foos")
table: com.rethinkscala.ast.Table = Table(foos,Some(false),Some(DB(test)))
scala> val records = for(i <-1 to 5) yield SelectFoo(i)
records: scala.collection.immutable.IndexedSeq[SelectFoo] = Vector(SelectFoo(1), SelectFoo(2), SelectFoo(3), SelectFoo(4), SelectFoo(5))
scala> table.insert(records).run
res2: Either[com.rethinkscala.net.RethinkError,com.rethinkscala.net.InsertResult] = Right(InsertResult(5,0,0,0,None,null,0,0))
scala> val results = table.between(2,4).order("id").as[SelectFoo]
results: Either[com.rethinkscala.net.RethinkError,Seq[SelectFoo]] = Right(Cursor(SelectFoo(2), SelectFoo(3), SelectFoo(4)))
scala> val results = table.filter(f=> f \ "id"> 2).as[SelectFoo]
results: Either[com.rethinkscala.net.RethinkError,Seq[SelectFoo]] = Right(Cursor(SelectFoo(3), SelectFoo(5), SelectFoo(4)))
scala> val results = table.filter(f=> f \ "id"> 2).order("id".desc).as[SelectFoo]
results: Either[com.rethinkscala.net.RethinkError,Seq[SelectFoo]] = Right(Cursor(SelectFoo(5), SelectFoo(4), SelectFoo(3)))
More found at here Be sure to check out the wiki
Installation
Note needs protobuf 2.5.0 installed
Checkout Main repo
sudo apt-get install protobuf-compiler
git clone [email protected]:kclay/rethink-scala.git
cd rethink-scala
sbt compile
Version
0.4.9 - 12/07/15
- Update to Scala 2.11.7, SBT 0.13.8, and target JVM 1.8 (thanks @crockpotveggies)
- Added scalaz-stream support
- Refactored connections to have
Backends
, this will allow switching connection/stream implementations - Updated to support rethink API 2.0
0.4.6 - 05/12/15
- Polymorphism support #23
- No need to extend
Document
anymore #19 - Breaking Change - table.getAll(indes:String,attr:Any*) is now table.getAll(attr:Any*).withIndex(index:String)
- Breaking Change - Updated table.indexCreate definition
- Support for Continuing a stream
- Added functional blocking delegate which uses
Try
- Updated Netty.io to 4.0.27.Final
- Fixed issues with connection pooling where results wouldn't resolve and timeout.
- Breaking Change - casting an Var to map is now done with
mapOf[T]
- Made connection setup sequence fully async
- Blocking._ and Async._ now has Version3 visible
- Added more examples/tutorial (thanks @Shegnc ) ###0.4.6 - 01/29/15
- Geo Support
- Uuid Support
- Fixed restoring connection on failed quries (thanks @mick-h)
- Fixed Option support (thanks @mick-h)
- Fixed issue were null results were not handle properly (thanks @mick-h)
- Fixed nested document insert (thanks @maohde)
- Fixed exception being thrown when query returns back empty results (thanks @mick-h)
0.4.5 - 10/12/14
- Fixing Nested documents for json
- Fixed connection pooling
- Minor bug fixes
0.4.4 - 8/26/214
- JSON Support
- Start of HTTP Support
- Updated to support 1.13.x
0.4.3 - 9/24/13
- Added zip
- bug fixes
0.4.2 - 08/12/13
- Fixed update and filter quries
0.4 - 08/09/13
- Fixed race conditions in connection pool
- Switched to using protobuf-java 2.4.1 due to compatibility issues with akka-cluster 2.2.0
- minor bug fixes
0.3 - 07/28/13
- A
com.rethinkscala.Schema
object can be created , this provides some helper methods to provide type-saftey for tables - The map representation of the query is returned as well if cased to
com.rethinkscala.net.Document
and is accessable by using a acom.rethinkscala.net.DocPath
- Active record type update and saves are not available, importing you schema into scope provides your case classes with an
save
andupdate
method,update
does a full replace for now - Case classes can now have their
id
automatically generated by providing aid:Option[String] = None
- Documents now have a beforeInsert and afterInsert lifecycle, afterInsert/afterInsert(generatedKey:String)
- Driver now supports 1.7.x which allows you to fetch the
new_vals
for single entry update/insert via ChangeResult.resultValue[T] - minor bug fixes
0.2 - 07/04/13
Streams are now supported, this means that when using methods like .getAll
and between
the results will be wrapped in a com.rethinkscala.net.Cursor[R]
which will act like an Seq[R]
0.1 -
Initial release