public override string ToStr() { StringBuilder sb = new StringBuilder(); sb.Append(ParserUtils.TableToStrEscape(Name)); if (AlterColumn == AlterColumnType.AddColumn || AlterColumn == AlterColumnType.AlterColumn) { sb.Append(" "); sb.Append(Type.ToStr()); if (Nullable) { sb.Append(" NULL"); } else { sb.Append(" NOT NULL"); } if (AutoIncrement) { sb.Append(" AUTO_INCRENENT"); } if (PrimaryKey) { sb.Append(" PRIMARY KEY"); } } return(sb.ToString()); }
public override string ToStr() { return("cast(" + Operand.ToStr() + " as " + ToType.ToStr() + ")"); }