Docs
Launch GraphOS Studio
You're viewing documentation for a previous version of this software. Switch to the latest stable version.


STRUCT

RecordSet

public struct RecordSet

A set of cache records.

Properties

storage

public private(set) var storage: [CacheKey: Record] = [:]

isEmpty

public var isEmpty: Bool

keys

public var keys: Set<CacheKey>

Methods

init(records:)

public init<S: Sequence>(records: S) where S.Iterator.Element == Record

insert(_:)

public mutating func insert(_ record: Record)

removeRecord(for:)

public mutating func removeRecord(for key: CacheKey)

removeRecords(matching:)

public mutating func removeRecords(matching pattern: CacheKey)

clear()

public mutating func clear()

insert(contentsOf:)

public mutating func insert<S: Sequence>(contentsOf records: S) where S.Iterator.Element == Record

merge(records:)

@discardableResult public mutating func merge(records: RecordSet) -> Set<CacheKey>

merge(record:)

@discardableResult public mutating func merge(record: Record) -> Set<CacheKey>
Next
Introduction
Edit on GitHubEditForumsDiscord

© 2024 Apollo Graph Inc.

Privacy Policy

Company