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.
the timeout for the current query. It replaces the timeout value set for this faunadb.FaunaClient if any, for the scope of this query. The timeout value has milliseconds precision.
the ExecutionContext
used to run the query asynchronously.
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 multiple queries as a single transaction.
Issues multiple queries as a single transaction.
the queries to run.
the timeout for the current query. It replaces the timeout value set for this faunadb.FaunaClient if any, for the scope of this query. The timeout value has milliseconds precision.
the ExecutionContext
used to run the query asynchronously.
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 multiple queries as a single transaction.
Issues multiple queries as a single transaction.
the queries to run.
the ExecutionContext
used to run the query asynchronously.
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.
the timeout for the current query. It replaces the timeout value set for this faunadb.FaunaClient if any for the scope of this query. The timeout value has milliseconds precision.
the ExecutionContext
used to run the query asynchronously.
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.
Issues a query.
Issues a query.
the query to run, created using the query dsl helpers in faunadb.query.
the timeout for the current query. It replaces the timeout value set for this faunadb.FaunaClient if any for the scope of this query. The timeout value has milliseconds precision.
the ExecutionContext
used to run the query asynchronously.
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.
Issues a query.
Issues a query.
the query to run, created using the query dsl helpers in faunadb.query.
the ExecutionContext
used to run the query asynchronously.
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.
Issues a query.
Issues a query.
the query to run, created using the query dsl helpers in faunadb.query.
the timeout for the current query. It replaces the timeout value set for this faunadb.FaunaClient if any for the scope of this query. The timeout value has milliseconds precision.
the ExecutionContext
used to run the query asynchronously.
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.
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.
user secret for the session scope
a function that receives a session client
the value produced by the session function
Creates a subscription to the result of the given read-only expression.
Creates a subscription to the result of the given read-only expression. When executed, the expression must only perform reads and produce a single streamable type, such as a reference or a version. Expressions that attempt to perform writes or produce non-streamable types will result in an error. Otherwise, any expression can be used to initiate a stream, including user-defined function calls.
the query to subscribe to.
fields to opt-in on the events.
if true the second event will be a snapshot event of the target
the ExecutionContext
used to run the query asynchronously.
A scala.concurrent.Future containing a java.util.concurrent.Flow.Publisher which yields element of type faunadb.values.Value. The scala.concurrent.Future fails if the stream cannot be setup.
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: