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