public virtual string CreateComment(string objectTypeName, IEnumerable <Identifier> objectNames, DatabaseStringOrdinal description, DatabaseStringOrdinal otherDescription)
        {
            var objectName   = string.Join(".", objectNames.Select(x => x.AsSqlIndentifier()));
            var commentStart = $"COMMENT ON {objectTypeName} {objectName}";

            if (description == null && otherDescription != null)
            {
                return($"{commentStart} IS NULL");
            }
            if (description != null && description != otherDescription)
            {
                return($"{commentStart} IS '{DoubleSingleQuotes(description)}'");
            }
            return(null);
        }
 public virtual string DoubleSingleQuotes(DatabaseStringOrdinal value)
 {
     return(DoubleSingleQuotes(value?.Value));
 }
 public virtual string QuoteIdentifierIfNeeded(DatabaseStringOrdinal value)
 {
     return(QuoteIdentifierIfNeeded(value?.Value));
 }
Beispiel #4
0
 public Command Append(DatabaseStringOrdinal value)
 {
     return(Append(value.ToString()));
 }