using DbAPI.Connections; using DbAPI.User; using DTS.Common.Interface.Database; using System; namespace DbAPI.Database { /// /// Database related functions (InsertVersion, GetDatabaseVersion) /// public interface IDatabase { int GetSQLVersion(IConnectionDetails connection); /// /// retrieves the highest database version for a given database /// User must be logged into database /// /// DataPRO user retrieving information /// Database connection info /// /// 0 (ERROR_SUCCESS) on success, all other values are errors /// returns ERROR_ACCESS_DENIED if user is not logged in ulong GetDatabaseVersion(IUserDbRecord user, IConnectionDetails connection, out int version); /// /// inserts a database version record into a given database /// User must be logged into database /// does not check if version is already in the database or the relation of the version /// number to any versions in the database /// /// user inserting new record /// database connection details /// version number to insert /// step number to insert /// DateTime to put on the inserted record /// Remarks to record with insert /// What user to associate with the insert record (does not have to match any actual users) /// 0 (ERROR_SUCCESS) on success, all other values are errors /// returns ERROR_ACCESS_DENIED if user is not logged in ulong InsertDatabaseVersion(IUserDbRecord user, IConnectionDetails connection, int version, int step, DateTime date, string remarks, string userField); } }