The Scala native client for FaunaDB.
Create a new client using faunadb.FaunaClient.apply.
Query requests are made asynchronously: All methods will return a scala.concurrent.Future.
Example:
case class User(ref: RefV, name: String, age: Int) val client = FaunaClient(secret = "myKeySecret") val fut = client.query(Get(Ref(Class("users"), "123"))) val instance = Await.result(fut, 5.seconds) val userCast = for { ref <- instance("ref").to[RefV] name <- instance("data", "name").to[String] age <- instance("data", "age").to[Int] } yield { User(ref, name, age) } userCast.get
Companion object to the FaunaClient class.
The Scala native client for FaunaDB.
Create a new client using faunadb.FaunaClient.apply.
Query requests are made asynchronously: All methods will return a scala.concurrent.Future.
Example: