Наследование: IDbmsSyntax
        public string GenerateVersionCheck()
        {
            string versionCheckSql = string.Empty;

            if (_currentVersion.HasValue)
            {
                versionCheckSql = DbmsSyntax.GenerateVersionCheck(TableName, _currentVersion.Value.ToString(), _deltaSet);
            }

            return(versionCheckSql);
        }
        public string GenerateUndoDeltaFragmentFooter(ChangeScript changeScript)
        {
            StringBuilder builder = new StringBuilder();

            builder.AppendLine("DELETE FROM " + TableName
                               + " WHERE ChangeNumber = " + changeScript.GetId()
                               + " AND Project = '" + _deltaSet + "'"
                               + DbmsSyntax.GenerateStatementDelimiter());
            builder.AppendLine(DbmsSyntax.GenerateCommit());
            builder.Append("--------------- Fragment ends: " + changeScript + " ---------------");
            return(builder.ToString());
        }
        public string GenerateDoDeltaFragmentHeader(ChangeScript changeScript)
        {
            StringBuilder builder = new StringBuilder();

            builder.AppendLine("--------------- Fragment begins: " + changeScript + " ---------------");

            builder.AppendLine("INSERT INTO " + TableName +
                               " (ChangeNumber, Project, StartDate, AppliedBy, FileName)" +
                               " VALUES (" + changeScript.GetId() + ", '" + _deltaSet + "', " +
                               DbmsSyntax.GenerateTimestamp() +
                               ", " + DbmsSyntax.GenerateChangeOwner() + ", '" + changeScript.GetDescription() + "')" +
                               DbmsSyntax.GenerateStatementDelimiter());
            builder.Append(DbmsSyntax.GenerateCommit());
            return(builder.ToString());
        }
Пример #4
0
        private void Instanciar(string sgbd)
        {
            var dbmsFactory = new DbmsFactory(sgbd, "connection=string");

            dbmsSyntax = (DbmsSyntax)dbmsFactory.CreateDbmsSyntax();
        }
Пример #5
0
 private void Instanciar(string sgbd)
 {
     var dbmsFactory = new DbmsFactory(sgbd, "connection=string");
     dbmsSyntax = (DbmsSyntax)dbmsFactory.CreateDbmsSyntax();
 }