Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
signalapp
GitHub Repository: signalapp/Signal-iOS
Path: blob/main/SignalServiceKit/Contacts/SignalAccountStore.swift
1 views
//
// Copyright 2024 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
//

import Foundation

public protocol SignalAccountStore {
    func fetchSignalAccount(for rowId: SignalAccount.RowId, tx: DBReadTransaction) -> SignalAccount?
}

public class SignalAccountStoreImpl: SignalAccountStore {
    public init() {}

    public func fetchSignalAccount(for rowId: SignalAccount.RowId, tx: DBReadTransaction) -> SignalAccount? {
        return SDSCodableModelDatabaseInterfaceImpl().fetchModel(modelType: SignalAccount.self, rowId: rowId, tx: tx)
    }
}