Package com.fauna.client
Class Fauna
- java.lang.Object
-
- com.fauna.client.Fauna
-
public final class Fauna extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static FaunaClientclient()Create a default Fauna client.static FaunaClientclient(FaunaConfig config)Create a Fauna client with the given FaunaConfig (and default HTTP client, and RetryStrategy).static FaunaClientclient(FaunaConfig config, java.net.http.HttpClient httpClient, RetryStrategy retryStrategy)Create a Fauna client with the given FaunaConfig, HTTP client, and RetryStrategy.static FaunaClientlocal()Create a Fauna client for local development using the Fauna Docker container.static FaunaClientscoped(FaunaClient client, java.lang.String database)Create a new Fauna client that wraps an existing client, but is scoped to a specific database.static FaunaClientscoped(FaunaClient client, java.lang.String database, FaunaRole role)Create a new Fauna client that wraps an existing client, but is scoped to a specific database.
-
-
-
Method Detail
-
client
public static FaunaClient client()
Create a default Fauna client.- Returns:
- A FaunaClient (or subclass of it).
-
client
public static FaunaClient client(FaunaConfig config)
Create a Fauna client with the given FaunaConfig (and default HTTP client, and RetryStrategy).- Parameters:
config- Fauna configuration object.- Returns:
- A FaunaClient (or subclass of it).
-
client
public static FaunaClient client(FaunaConfig config, java.net.http.HttpClient httpClient, RetryStrategy retryStrategy)
Create a Fauna client with the given FaunaConfig, HTTP client, and RetryStrategy.- Parameters:
config- Fauna configuration object.httpClient- An HTTP client (from java.net.http in Java 11+).retryStrategy- An implementation of RetryStrategy.- Returns:
- A FaunaClient (or subclass of it).
-
scoped
public static FaunaClient scoped(FaunaClient client, java.lang.String database)
Create a new Fauna client that wraps an existing client, but is scoped to a specific database.- Parameters:
client- Another Fauna client.database- The name of the database.- Returns:
- A FaunaClient (or subclass of it).
-
scoped
public static FaunaClient scoped(FaunaClient client, java.lang.String database, FaunaRole role)
Create a new Fauna client that wraps an existing client, but is scoped to a specific database.- Parameters:
client- Another Fauna client.database- The name of the database.role- A Fauna role (either built-in or user defined).- Returns:
- A FaunaClient (or subclass of it).
-
local
public static FaunaClient local()
Create a Fauna client for local development using the Fauna Docker container.- Returns:
- A FaunaClient (or subclass of it).
-
-