Package

faunadb

Permalink

package faunadb

Visibility
  1. Public
  2. All

Type Members

  1. final case class ErrorResponse(status: Int, error: String) extends FaunaResponse with Product with Serializable

    Permalink
  2. class FaunaClient extends AnyRef

    Permalink

    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
  3. sealed abstract class FaunaResponse extends AnyRef

    Permalink
  4. final class NoContentResponse extends FaunaResponse

    Permalink
  5. case class QueryError(position: Seq[String], code: String, description: String, failures: IndexedSeq[ValidationFailure], cause: IndexedSeq[QueryError]) extends Product with Serializable

    Permalink
  6. final case class QueryErrorResponse(status: Int, errors: IndexedSeq[QueryError]) extends FaunaResponse with Product with Serializable

    Permalink
  7. final case class QueryResponse(status: Int, body: ObjectNode) extends FaunaResponse with Product with Serializable

    Permalink
  8. final case class ResourceResponse(status: Int, resource: JsonNode, references: ObjectNode) extends FaunaResponse with Product with Serializable

    Permalink

Value Members

  1. object FaunaClient

    Permalink

    Companion object to the FaunaClient class.

  2. object QueryError extends Serializable

    Permalink
  3. package errors

    Permalink
  4. package query

    Permalink
  5. package values

    Permalink

Ungrouped