using DbAPI.Connections; using DTS.Common.Interface.Database; using DTS.Common.Interface.TestSetups; namespace DbAPI.TestSetups { /// /// defines functions to create, retrieve, update, delete graphs /// public interface ICalculatedChannels { /// /// removes calculated channel from database /// /// user committing delete /// connection over which to delete /// database id of calculated channel to delete /// ulong CalculatedChannelsDelete(IUserDbRecord user, IConnectionDetails connection, int calculatedChannelId); /// /// retrieves all CalculatedChannel records matching search criteria /// /// user making query /// connection query is being made on /// database id of calculated channel (can be null) /// test setup calculated channel(s) belong to (can be empty) /// all matching records found /// 0 (ERROR_SUCCESS) on success, all other values are error codes ulong CalculatedChannelsGet(IUserDbRecord user, IConnectionDetails connection, int? calculatedChannelId, string testSetupName, out ICalculatedChannelRecord[] records); /// /// inserts a new calculated channel into the database /// original record is modified with database id after insert is complete /// /// user adding record /// connection record is being added on /// record being added /// 0 (ERROR_SUCCESS) on success, all other values are error codes ulong CalculatedChannelsInsert(IUserDbRecord user, IConnectionDetails connection, ref ICalculatedChannelRecord record); /// /// updates calculated channel in the database /// /// user updating record /// connection record is being updated on /// record to be updated /// 0 (ERROR_SUCCESS) on success, all other values are error codes ulong CalculatedChannelsUpdate(IUserDbRecord user, IConnectionDetails connection, ICalculatedChannelRecord record); } }