public ObserverSnapshotStorage(ObserverStorageOptions config) { this.config = config; var observerStateTable = config.ObserverSnapshotTable; deleteSql = $"DELETE FROM {observerStateTable} where StateId=@StateId"; getByIdSql = $"select * FROM {observerStateTable} where StateId=@StateId"; insertSql = $"INSERT into {observerStateTable}(StateId,Version,StartTimestamp)VALUES(@StateId,@Version,@StartTimestamp)"; updateSql = $"update {observerStateTable} set Version=@Version,StartTimestamp=@StartTimestamp where StateId=@StateId"; updateStartTimestampSql = $"update {observerStateTable} set StartTimestamp=@StartTimestamp where StateId=@StateId"; }
public ObserverSnapshotStorage(ObserverStorageOptions table) { grainConfig = table; }