SwiftclassReplicatorServices
class ReplicatorServices.Database
Members 15
- deinit
deinit - field
let _writer_lock: os.OSAllocatedUnfairLock<()> - field
let clientDescriptorStore: ReplicatorServices.Database.ClientDescriptorStore+0x30 - field
let clientSettingsStore: ReplicatorServices.Database.ClientSettingsStore+0x38 - field
let dataMigrationStore: ReplicatorServices.Database.DataMigrationStore+0x48 - field
let db: ReplicatorServices.SQLDatabase+0x58 - field
let deviceMetadataStore: ReplicatorServices.Database.DeviceMetadataStore+0x10 - field
let pairingRelationshipStore: ReplicatorServices.Database.PairingRelationshipStore+0x28 - field
let recordDataStore: ReplicatorServices.Database.RecordDataStore+0x20 - field
let recordMetadataStore: ReplicatorServices.Database.RecordMetadataStore+0x18 - field
let runOnceStore: ReplicatorServices.Database.RunOnceStore+0x50 - field
let zoneVersionStore: ReplicatorServices.Database.ZoneVersionStore+0x40 - func
update(reason: String, _: (ReplicatorServices.Database.MutableStore) throws -> ()) throws -> () - init
ReplicatorServices.Database.__allocating_init(url: Foundation.URL, corruptionHandler: ((Error) -> ())?) throws -> ReplicatorServices.Database - init
ReplicatorServices.Database.__allocating_init(storage: ReplicatorServices.SQLDatabase.Storage, corruptionHandler: ((Error) -> ())?) throws -> ReplicatorServices.Database
Header
class Database { class RecordDataStore: ReplicatorServices.Database.DatabaseAccessor { func recordData(recordID: ReplicatorEngine.Record.ID, compatibleWithZoneProtocolVersion: ReplicatorEngine.ProtocolVersion) throws -> ReplicatorEngine.Record.Value? func recordData(recordID: ReplicatorEngine.Record.ID, protocolVersion: Swift.UInt64) throws -> ReplicatorEngine.Record.Value? func urls(zoneID: ReplicatorEngine.Zone.ID) throws -> [Foundation.URL] func urls(recordID: ReplicatorEngine.Record.ID) throws -> [Foundation.URL] func recordIDs(zoneID: ReplicatorEngine.Zone.ID) throws -> [ReplicatorEngine.Record.ID] func zoneIDs() throws -> [ReplicatorEngine.Zone.ID] func isKnownFilename(_: Swift.String) throws -> Swift.Bool func remotelyOwnedRecordIDs(zoneID: ReplicatorEngine.Zone.ID) throws -> [ReplicatorEngine.Record.ID] func recordData(recordID: ReplicatorEngine.Record.ID) throws -> [ReplicatorEngine.Record.Value] deinit } class MutableRecordDataStore: ReplicatorServices.Database.RecordDataStore { func update(recordID: ReplicatorEngine.Record.ID, recordData: ReplicatorEngine.Record.Value) throws func remove(recordID: ReplicatorEngine.Record.ID) throws func remove(zoneID: ReplicatorEngine.Zone.ID) throws func removeAll() throws func replaceRecordID(oldRecordID: ReplicatorEngine.Record.ID, newRecordID: ReplicatorEngine.Record.ID) throws deinit } class PairingRelationshipStore: ReplicatorServices.Database.DatabaseAccessor { func pairingRelationships() throws -> [Foundation.UUID : ReplicatorEngine.PairingRelationship] deinit } class MutablePairingRelationshipStore: ReplicatorServices.Database.PairingRelationshipStore { func update(pairingRelationship: ReplicatorEngine.PairingRelationship) throws func remove(relationshipID: Foundation.UUID) throws func removeAll() throws deinit } class RecordMetadataStore: ReplicatorServices.Database.DatabaseAccessor { enum RecordMetadataStoreError { case invalidInput } func recordMetadata() throws -> [ReplicatorEngine.Record.ID : ReplicatorEngine.RecordMetadata] func recordMetadataWithClientDefinedIDs(clientID: Swift.String) throws -> [ReplicatorEngine.Record.ID : ReplicatorEngine.RecordMetadata] func enumerateMetadata(zoneID: ReplicatorEngine.Zone.ID?, handler: (_: ReplicatorEngine.RecordMetadata) -> ()) throws func recordMetadata(for: ReplicatorEngine.Record.ID) throws -> ReplicatorEngine.RecordMetadata? func expiredRecordIDs() throws -> [ReplicatorEngine.Record.ID] func earliestExpirationDate() throws -> Foundation.Date? func zoneIDs() throws -> [ReplicatorEngine.Zone.ID] func locallyOwnedMetadataCount(zoneID: ReplicatorEngine.Zone.ID) throws -> Swift.Int func hasMetadata(from: Foundation.UUID) throws -> Swift.Bool func clientDefinedID(for: ReplicatorEngine.Record.ID) throws -> Swift.String? func firstRecordIDWithMissingClientRecordID() throws -> ReplicatorEngine.Record.ID? func anyRecordMetadata(relationshipID: Foundation.UUID) throws -> ReplicatorEngine.RecordMetadata? deinit } class MutableRecordMetadataStore: ReplicatorServices.Database.RecordMetadataStore { func update(recordMetadata: ReplicatorEngine.RecordMetadata) throws func remove(recordID: ReplicatorEngine.Record.ID) throws func remove(zoneID: ReplicatorEngine.Zone.ID) throws func removeRemotelyOwnedRecordMetadata(in: ReplicatorEngine.Zone.ID) throws func removeLocallyOwnedRecordMetadata(in: ReplicatorEngine.Zone.ID) throws func removeAll() throws func migrateToClientDefinedID(oldRecordID: ReplicatorEngine.Record.ID, newRecordID: ReplicatorEngine.Record.ID) throws func insertBadMetadata(zoneID: ReplicatorEngine.Zone.ID) throws deinit } class ClientSettingsStore: ReplicatorServices.Database.DatabaseAccessor { func clientSettings() throws -> [Swift.String : ReplicatorServices.ClientSettings] deinit } class MutableClientSettingsStore: ReplicatorServices.Database.ClientSettingsStore { func update(clientSettings: ReplicatorServices.ClientSettings) throws func remove(clientIdentifier: Swift.String) throws deinit } class ZoneVersionStore: ReplicatorServices.Database.DatabaseAccessor { func zoneVersions() throws -> [ReplicatorEngine.ZoneVersionRelationshipType : [ReplicatorEngine.Zone.ID : Foundation.UUID]] deinit } class MutableZoneVersionStore: ReplicatorServices.Database.ZoneVersionStore { func update(relationshipType: ReplicatorEngine.ZoneVersionRelationshipType, zoneID: ReplicatorEngine.Zone.ID, version: Foundation.UUID) throws func remove(relationshipType: ReplicatorEngine.ZoneVersionRelationshipType) throws func remove(relationshipType: ReplicatorEngine.ZoneVersionRelationshipType, zoneID: ReplicatorEngine.Zone.ID) throws func remove(zoneID: ReplicatorEngine.Zone.ID) throws func removeAll() throws deinit } class ClientDescriptorStore: ReplicatorServices.Database.DatabaseAccessor { func clientDescriptors() throws -> [Swift.String : ReplicatorServices.ClientDescriptor] deinit } class MutableClientDescriptorStore: ReplicatorServices.Database.ClientDescriptorStore { func update(clientDescriptor: ReplicatorServices.ClientDescriptor) throws func remove(clientIdentifier: Swift.String) throws deinit } class DeviceMetadataStore: ReplicatorServices.Database.DatabaseAccessor { func localDeviceID() throws -> Swift.String? func hasMigratedFromChrono() throws -> Swift.Bool func isEnabled() throws -> Swift.Bool func allowListEnabled() throws -> Swift.Bool func allowList() throws -> [Foundation.UUID] func lastAuthKitReconciliationDate() throws -> Foundation.Date? func localDeviceMetadata() throws -> ReplicatorServices.Database.LocalDeviceMetadata deinit } class MutableDeviceMetadataStore: ReplicatorServices.Database.DeviceMetadataStore { func set(localDeviceMetadata: ReplicatorServices.Database.LocalDeviceMetadata) throws func set(localDeviceID: Swift.String) throws func set(hasMigratedFromChrono: Swift.Bool) throws func set(isEnabled: Swift.Bool) throws func set(lastAuthKitReconciliationDate: Foundation.Date?) throws func set(allowListEnabled: Swift.Bool, allowList: [Foundation.UUID]?) throws func set(allowList: [Foundation.UUID]) throws func update(allowListEnabled: Swift.Bool, allowList: [Foundation.UUID]?) throws func update(allowList: [Foundation.UUID]) throws deinit } class DataMigrationStore: ReplicatorServices.Database.DatabaseAccessor { func completedStages() throws -> Swift.Set<Swift.String> deinit } class MutableDataMigrationStore: ReplicatorServices.Database.DataMigrationStore { func complete(stage: Swift.String) throws deinit } struct LocalDeviceMetadata { var deviceID: Swift.String? var hasMigratedFromChronod: Swift.Bool var isEnabled: Swift.Bool var allowListEnabled: Swift.Bool var allowList: [Foundation.UUID] var lastAuthKitReconciliationDate: Foundation.Date? } enum DatabaseError { case malformedData } class MutableStore { let deviceMetadataStore: ReplicatorServices.Database.MutableDeviceMetadataStore let recordMetadataStore: ReplicatorServices.Database.MutableRecordMetadataStore let recordDataStore: ReplicatorServices.Database.MutableRecordDataStore let pairingRelationshipStore: ReplicatorServices.Database.MutablePairingRelationshipStore let clientDescriptorStore: ReplicatorServices.Database.MutableClientDescriptorStore let clientSettingsStore: ReplicatorServices.Database.MutableClientSettingsStore let zoneVersionStore: ReplicatorServices.Database.MutableZoneVersionStore let dataMigrationStore: ReplicatorServices.Database.MutableDataMigrationStore let runOnceStore: ReplicatorServices.Database.MutableRunOnceStore deinit } class DatabaseAccessor { weak var _db: ReplicatorServices.SQLDatabase? deinit } enum RelationshipState { case introduced case pairing case paired case migrating case inactive } enum DestinationType { case all case array } class RunOnceStore: ReplicatorServices.Database.DatabaseAccessor { func isComplete(_: Swift.String) throws -> Swift.Bool deinit } class MutableRunOnceStore: ReplicatorServices.Database.RunOnceStore { func complete(_: Swift.String) throws deinit } let deviceMetadataStore: ReplicatorServices.Database.DeviceMetadataStore let recordMetadataStore: ReplicatorServices.Database.RecordMetadataStore let recordDataStore: ReplicatorServices.Database.RecordDataStore let pairingRelationshipStore: ReplicatorServices.Database.PairingRelationshipStore let clientDescriptorStore: ReplicatorServices.Database.ClientDescriptorStore let clientSettingsStore: ReplicatorServices.Database.ClientSettingsStore let zoneVersionStore: ReplicatorServices.Database.ZoneVersionStore let dataMigrationStore: ReplicatorServices.Database.DataMigrationStore let runOnceStore: ReplicatorServices.Database.RunOnceStore let db: ReplicatorServices.SQLDatabase let _writer_lock: os.OSAllocatedUnfairLock<()> init(storage: ReplicatorServices.SQLDatabase.Storage, corruptionHandler: ((_: any Swift.Error) -> ())?) throws init(url: Foundation.URL, corruptionHandler: ((_: any Swift.Error) -> ())?) throws final func update(reason: Swift.String, _: (_: ReplicatorServices.Database.MutableStore) throws -> ()) throws deinit }