Classes
The following classes are available globally.
-
Client
represents a HTTP client for a FaunaDB server. It provides methods, such asquery
andquery(batch:)
that you can use to execute queries in your server.Note
This class is meant to be reused as much as possible. If you need to connect to the same server but using a different key’s secret, usenewSessionClient
method instead of creating a newClient
instance.Declaration
Swift
public final class Client
-
Wraps a HTTP 400 error response.
See moreDeclaration
Swift
public final class BadRequest: FaunaError
-
Wraps a HTTP 401 error response.
See moreDeclaration
Swift
public final class Unauthorized: FaunaError
-
Wraps a HTTP 403 error response.
See moreDeclaration
Swift
public final class PermissionDenied: FaunaError
-
Wraps a HTTP 404 error response.
See moreDeclaration
Swift
public final class NotFound: FaunaError
-
Wraps a HTTP 500 error response.
See moreDeclaration
Swift
public final class InternalError: FaunaError
-
Wraps a HTTP 503 error response.
See moreDeclaration
Swift
public final class Unavailable: FaunaError
-
Wraps any unknown error.
See moreDeclaration
Swift
public final class UnknownError: FaunaError
-
Error returned when a timeout occurs during the query execution.
See moreDeclaration
Swift
public final class TimeoutError: FaunaError
-
Represent the result of an asynchronous query executed by FaunaDB.
Note
All methods available to handleQueryResult
success or failure will optionally receive aDispatchQueue
. Remember, the onlyDispatchQueue
allowed to update the UI isDispatchQueue.main
.Declaration
Swift
public class QueryResult<T>