public void SaveToStructure(AbstractObjectStructure obj) { var table = (TableStructure)obj; if (!String.IsNullOrEmpty(Engine)) { table.SpecificData["mysql.engine"] = Engine; } if (!String.IsNullOrEmpty(CharacterSet)) { table.SpecificData["mysql.character_set"] = CharacterSet; } if (!String.IsNullOrEmpty(Collation)) { table.SpecificData["mysql.collation"] = Collation; } if (AutoIncrement != null) { table.SpecificData["mysql.auto_increment"] = AutoIncrement.ToString(); } if (Checksum != null) { table.SpecificData["mysql.checksum"] = Checksum.Value ? "1" : "0"; } if (DelayKeyWrite != null) { table.SpecificData["mysql.delay_key_write"] = DelayKeyWrite.Value ? "1" : "0"; } }
public string GetPropertiesAsXml() { StringBuilder sbResult = new StringBuilder(); sbResult.Append("<" + (String.IsNullOrEmpty(ColumnName) ? "_" : ColumnName) + GetRegexProperties()); if (!String.IsNullOrEmpty((PrecedingRegEx ?? "").TrimEnd('"'))) { sbResult.Append(" Prefix = '" + PrecedingRegEx + "'"); } if (!String.IsNullOrEmpty((TrailingRegEx ?? "").TrimEnd('"'))) { sbResult.Append(" Suffix = '" + TrailingRegEx + "'"); } if (ColumnType != RegexColumnType.STRING) { sbResult.Append(" Type = '" + ColumnType.ToString() + "'"); } if (!String.IsNullOrEmpty(ValueMatchingCondition)) { sbResult.Append(" Condition = '" + ValueMatchingCondition + "'"); } if (AutoIncrement) { sbResult.Append(" AutoIncrement = '" + AutoIncrement.ToString() + "'"); } if (AutoIncrement) { sbResult.Append(" StartValue = '" + StartValue.ToString() + "'"); } if (AutoIncrement) { sbResult.Append(" Increment = '" + Increment.ToString() + "'"); } if (!String.IsNullOrEmpty(Expression)) { sbResult.Append(" Expression = '" + Expression + "'"); } if (IsForeignKey) { sbResult.Append(" ForeignKey = '" + IsForeignKey.ToString() + "'"); } if (IsUnique) { sbResult.Append(" PrimaryKey = '" + IsUnique.ToString() + "'"); } if (!String.IsNullOrEmpty(DisplayName)) { sbResult.Append(" DisplayName = '" + DisplayName + "'"); } if (!String.IsNullOrEmpty(Description)) { sbResult.Append(" Description = '" + Description + "'"); } if (!String.IsNullOrEmpty(Default)) { sbResult.Append(" Default = '" + Default + "'"); } sbResult.Append(" />"); return(sbResult.ToString()); }