Remove SCUM sqlite user projections
This commit is contained in:
@@ -36,6 +36,11 @@ type StoreSnapshot struct {
|
||||
GameClientBridgeSnapshots []domain.GameClientBridgeSnapshot `json:"gameClientBridgeSnapshots"`
|
||||
GameClientBridgeStreams []domain.GameClientBridgeSnapshotStream `json:"gameClientBridgeStreams"`
|
||||
PluginDataRecords []domain.PluginDataRecord `json:"pluginDataRecords"`
|
||||
SCUMUsers []domain.SCUMUser `json:"scumUsers"`
|
||||
SCUMUserTrajectories []domain.SCUMUserTrajectory `json:"scumUserTrajectories"`
|
||||
SCUMVehicles []domain.SCUMVehicle `json:"scumVehicles"`
|
||||
SCUMVehicleTrajectories []domain.SCUMVehicleTrajectory `json:"scumVehicleTrajectories"`
|
||||
SCUMVehicleLocks []domain.SCUMVehicleLock `json:"scumVehicleLocks"`
|
||||
}
|
||||
|
||||
type runtimeSnapshot struct {
|
||||
@@ -168,6 +173,21 @@ func (store *FileStore) GameClientBridgeSnapshotStreams() GameClientBridgeSnapsh
|
||||
func (store *FileStore) PluginDataRecords() PluginDataRecordRepository {
|
||||
return &persistentRepository[domain.PluginDataRecord, domain.PluginDataFilter]{repository: store.MemoryStore.pluginDataRecords, persist: store.persist}
|
||||
}
|
||||
func (store *FileStore) SCUMUsers() SCUMUserRepository {
|
||||
return &persistentRepository[domain.SCUMUser, domain.SCUMUserFilter]{repository: store.MemoryStore.scumUsers, persist: store.persist}
|
||||
}
|
||||
func (store *FileStore) SCUMUserTrajectories() SCUMUserTrajectoryRepository {
|
||||
return &persistentRepository[domain.SCUMUserTrajectory, domain.SCUMUserTrajectoryFilter]{repository: store.MemoryStore.scumUserTracks, persist: store.persist}
|
||||
}
|
||||
func (store *FileStore) SCUMVehicles() SCUMVehicleRepository {
|
||||
return &persistentRepository[domain.SCUMVehicle, domain.SCUMVehicleFilter]{repository: store.MemoryStore.scumVehicles, persist: store.persist}
|
||||
}
|
||||
func (store *FileStore) SCUMVehicleTrajectories() SCUMVehicleTrajectoryRepository {
|
||||
return &persistentRepository[domain.SCUMVehicleTrajectory, domain.SCUMVehicleTrajectoryFilter]{repository: store.MemoryStore.scumVehicleTracks, persist: store.persist}
|
||||
}
|
||||
func (store *FileStore) SCUMVehicleLocks() SCUMVehicleLockRepository {
|
||||
return &persistentRepository[domain.SCUMVehicleLock, domain.SCUMVehicleLockFilter]{repository: store.MemoryStore.scumVehicleLocks, persist: store.persist}
|
||||
}
|
||||
func (store *FileStore) load() error {
|
||||
data, err := os.ReadFile(store.path)
|
||||
if err != nil {
|
||||
@@ -312,6 +332,11 @@ func (store *FileStore) snapshot() StoreSnapshot {
|
||||
GameClientBridgeSnapshots: snapshotRepository(store.MemoryStore.bridgeSnapshots.memoryRepository),
|
||||
GameClientBridgeStreams: snapshotRepository(store.MemoryStore.bridgeStreams),
|
||||
PluginDataRecords: snapshotRepository(store.MemoryStore.pluginDataRecords),
|
||||
SCUMUsers: snapshotRepository(store.MemoryStore.scumUsers),
|
||||
SCUMUserTrajectories: snapshotRepository(store.MemoryStore.scumUserTracks),
|
||||
SCUMVehicles: snapshotRepository(store.MemoryStore.scumVehicles),
|
||||
SCUMVehicleTrajectories: snapshotRepository(store.MemoryStore.scumVehicleTracks),
|
||||
SCUMVehicleLocks: snapshotRepository(store.MemoryStore.scumVehicleLocks),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -347,6 +372,11 @@ func (store *FileStore) loadSnapshot(snapshot StoreSnapshot) {
|
||||
loadRepository(store.MemoryStore.bridgeSnapshots.memoryRepository, snapshot.GameClientBridgeSnapshots)
|
||||
loadRepository(store.MemoryStore.bridgeStreams, snapshot.GameClientBridgeStreams)
|
||||
loadRepository(store.MemoryStore.pluginDataRecords, snapshot.PluginDataRecords)
|
||||
loadRepository(store.MemoryStore.scumUsers, snapshot.SCUMUsers)
|
||||
loadRepository(store.MemoryStore.scumUserTracks, snapshot.SCUMUserTrajectories)
|
||||
loadRepository(store.MemoryStore.scumVehicles, snapshot.SCUMVehicles)
|
||||
loadRepository(store.MemoryStore.scumVehicleTracks, snapshot.SCUMVehicleTrajectories)
|
||||
loadRepository(store.MemoryStore.scumVehicleLocks, snapshot.SCUMVehicleLocks)
|
||||
}
|
||||
|
||||
func (store *FileStore) loadRuntimeSnapshot(snapshot runtimeSnapshot) {
|
||||
|
||||
Reference in New Issue
Block a user