ParseKeyValueStore

public protocol ParseKeyValueStore

A store that supports key/value storage. It should be able to handle any object that conforms to encodable and decodable.

  • Delete an object from the store.

    Declaration

    Swift

    mutating func delete(valueFor key: String) throws

    Parameters

    key

    The unique key value of the object.

  • Delete all objects from the store.

    Declaration

    Swift

    mutating func deleteAll() throws
  • Gets an object from the store based on its key.

    Declaration

    Swift

    mutating func get<T>(valueFor key: String) throws -> T? where T : Decodable

    Parameters

    key

    The unique key value of the object.

  • Stores an object in the store with a given key.

    Declaration

    Swift

    mutating func set<T>(_ object: T, for key: String) throws where T : Encodable

    Parameters

    object

    The object to store.

    key

    The unique key value of the object.