Frees any resources held by the client and close the underlying connection.
Get the freshest timestamp reported to this client.
Issues multiple queries as a single transaction.
Issues multiple queries as a single transaction.
the queries to run.
A scala.concurrent.Future containing an IndexedSeq of the results of each query. Each result is an instance of faunadb.values.Value, which can be cast to a typed value using the faunadb.values.Field API. If *any* query fails, a failed future is returned.
Issues a query.
Issues a query.
the query to run, created using the query dsl helpers in faunadb.query.
A scala.concurrent.Future containing the query result. The result is an instance of faunadb.values.Result, which can be cast to a typed value using the faunadb.values.Field API. If the query fails, failed future is returned.
Create a new session client.
Create a new session client. The returned session client shares its parent com.faunadb.common.Connection instance. The returned session client must be closed after its usage.
user secret for the session client
a new session client
Creates a new scope to execute session queries.
Creates a new scope to execute session queries. Queries submitted within the session scope will be authenticated with the secret provided. A session client shares its parent's com.faunadb.common.Connection instance and is closed as soon as the session scope ends.
user secret for the session scope
a function that receives a session client
the value produced by the session function
Sync the freshest timestamp seen by this client.
Sync the freshest timestamp seen by this client.
This has no effect if staler than currently stored timestamp. WARNING: This should be used only when coordinating timestamps across multiple clients. Moving the timestamp arbitrarily forward into the future will cause transactions to stall.
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: