Scala ActiveRecord alternatives and similar packages
Based on the "Database" category.
Alternatively, view Scala ActiveRecord 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 -
PostgreSQL and MySQL async
DISCONTINUED. 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. -
scredis
Non-blocking, ultra-fast Scala Redis client built on top of Akka IO, used in production at Livestream -
Scruid
Scala + Druid: Scruid. A library that allows you to compose queries in Scala, and parse the result back into typesafe classes. -
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.
InfluxDB - Purpose built for real-time analytics at any scale.
Do you think we are missing an alternative of Scala ActiveRecord or a related project?
README
Scala ActiveRecord
scala-activerecord is an ORM library for Scala.
This library is inspired by ActiveRecord of Ruby on Rails. It is designed following the CoC(Convention over Configuration), DRY(Don't Repeat Yourself) principles.
Minimal example
- Sample snippet: Scastie
Model implementation:
package models
import com.github.aselab.activerecord._
import com.github.aselab.activerecord.dsl._
case class Person(name: String, age: Int) extends ActiveRecord
object Person extends ActiveRecordCompanion[Person]
Schema definition:
package models
import com.github.aselab.activerecord._
import com.github.aselab.activerecord.dsl._
object Tables extends ActiveRecordTables {
val people = table[Person]
}
ActiveRecord model usage:
import com.github.aselab.activerecord.dsl._
import models._
import scala.language.postfixOps
object App extends App {
Tables.initialize
Person("person1", 25).save()
Person("person2", 18).save()
Person("person3", 40).save()
Person("person4", 18).save()
Person.findBy("name", "person1") //=> Some(Person("person1", 25))
Person.findBy("age", 55) //=> None
Person.findAllBy("age", 18).toList //=> List(Person("person2", 18), Person("person4", 18))
Person.where(_.age.~ >= 20).orderBy(_.age desc).toList //=> List(Person("person3", 40), Person("person1", 25))
Tables.cleanup
}
Schema and query DSL is based on Squeryl.
Features
- Auto connection management
- Composable query operation
- Callback
- Validation
- Association
Documents and other resources
Web framework support
License
MIT
*Note that all licence references and agreements mentioned in the Scala ActiveRecord README section above
are relevant to that project's source code only.