PlistDatabase

public class PlistDatabase : StoredDatabase

Undocumented

  • Undocumented

    See more

    Declaration

    Swift

    public enum RelationSpec
  • Undocumented

    Declaration

    Swift

    public var root: URL?
  • Undocumented

    Declaration

    Swift

    public static func create(_ root: URL?, _ specs: [RelationSpec], codec: DataCodec? = nil) -> Result<PlistDatabase, RelationError>
  • Undocumented

    Declaration

    Swift

    public static func open(_ root: URL, _ specs: [RelationSpec], codec: DataCodec? = nil) -> Result<PlistDatabase, RelationError>
  • Undocumented

    Declaration

    Swift

    public subscript(name: String) -> StoredRelation? { get }
  • Undocumented

    Declaration

    Swift

    public func storedRelation(forName name: String) -> StoredRelation?
  • Undocumented

    Declaration

    Swift

    public func transaction<Return>(_ transactionFunction: () -> (Return, TransactionResult)) -> Result<Return, RelationError>
  • Undocumented

    Declaration

    Swift

    public func resultNeedsRetry<T>(_ result: Result<T, RelationError>) -> Bool
  • Iterates over all managed relations and ensures that each relation’s URL is set relative to the current root URL.

    Declaration

    Swift

    public func validateRelations() -> Result<(), RelationError>
  • Iterates over all managed relations and saves each one to disk, if needed.

    Declaration

    Swift

    public func saveRelations() -> Result<(), RelationError>
  • Undocumented

    Declaration

    Swift

    public func addSaveObserver(_ observer: @escaping (URL) -> Void)
  • Replace a local file within the doc database with a new file. Returns true if the replacement was done, and false if the local file isn’t part of the doc database.

    Declaration

    Swift

    public func replaceLocalFile(url: URL, movingURL: URL) -> Result<Bool, Error>
  • Delete a local file within the doc database. Returns true if the deletion was done, and false if the local file isn’t part of the doc database.

    Declaration

    Swift

    public func deleteLocalFile(url: URL) -> Result<Bool, Error>