p
faunadb
package faunadb
Ordering
- Alphabetic
Visibility
- Public
- All
Type Members
- final case class ErrorResponse (status: Int, error: String) extends FaunaResponse with Product with Serializable
-
class
FaunaClient
extends AnyRef
The Scala native client for FaunaDB.
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
- sealed abstract class FaunaResponse extends AnyRef
- final class NoContentResponse extends FaunaResponse
- case class QueryError (position: Seq[String], code: String, description: String, failures: IndexedSeq[ValidationFailure]) extends Product with Serializable
- final case class QueryErrorResponse (status: Int, errors: IndexedSeq[QueryError]) extends FaunaResponse with Product with Serializable
- final case class QueryResponse (status: Int, body: ObjectNode) extends FaunaResponse with Product with Serializable
- final case class ResourceResponse (status: Int, resource: JsonNode, references: ObjectNode) extends FaunaResponse with Product with Serializable
Value Members
-
object
FaunaClient
Companion object to the FaunaClient class.
- object QueryError extends Serializable