Pointer

public struct Pointer<T> : Fetchable, Encodable where T : ParseObject

A Pointer referencing a ParseObject.

  • The id of the object.

    Declaration

    Swift

    public var objectId: String
  • The class name of the object.

    Declaration

    Swift

    public var className: String
  • Create a Pointer type.

    Declaration

    Swift

    public init(_ target: T) throws

    Parameters

    target

    Object to point to.

  • Create a Pointer type.

    Declaration

    Swift

    public init(objectId: String)

    Parameters

    objectId

    The id of the object.

  • Declaration

    Swift

    public init(from decoder: Decoder) throws
  • Fetches the ParseObject synchronously with the current data from the server and sets an error if one occurs.

    Throws

    An error of ParseError type.

    Declaration

    Swift

    func fetch(includeKeys: [String]? = nil,
               options: API.Options = []) throws -> T

    Parameters

    includeKeys

    The name(s) of the key(s) to include that are ParseObjects. Use ["*"] to include all keys. This is similar to include and includeAll for Query.

    options

    A set of header options sent to the server. Defaults to an empty set.

  • Fetches the ParseObject asynchronously and executes the given callback block.

    Declaration

    Swift

    func fetch(includeKeys: [String]? = nil,
               options: API.Options = [],
               callbackQueue: DispatchQueue = .main,
               completion: @escaping (Result<T, ParseError>) -> Void)

    Parameters

    includeKeys

    The name(s) of the key(s) to include. Use ["*"] to include all keys.

    options

    A set of header options sent to the server. Defaults to an empty set.

    callbackQueue

    The queue to return to after completion. Default value of .main.

    completion

    The block to execute when completed. It should have the following argument signature: (Result<Self, ParseError>).

  • Fetches the ParseObject aynchronously with the current data from the server and sets an error if one occurs. Publishes when complete.

    Declaration

    Swift

    @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
    func fetchPublisher(includeKeys: [String]? = nil,
                        options: API.Options = []) -> Future<T, ParseError>

    Parameters

    includeKeys

    The name(s) of the key(s) to include that are ParseObjects. Use ["*"] to include all keys. This is similar to include and includeAll for Query.

    options

    A set of header options sent to the server. Defaults to an empty set.

    Return Value

    A publisher that eventually produces a single value and then finishes or fails.