/// <summary> /// RenderAny create-table column /// </summary> /// <param name="writer">to render to</param> public void ToEPL(TextWriter writer) { writer.Write(ColumnName); writer.Write(" "); if (OptionalExpression != null) { OptionalExpression.ToEPL(writer, ExpressionPrecedenceEnum.MINIMUM); } else { writer.Write(OptionalTypeName); if (OptionalTypeIsArray != null && OptionalTypeIsArray.Value) { if (OptionalTypeIsPrimitiveArray != null && OptionalTypeIsPrimitiveArray.Value) { writer.Write("[primitive]"); } else { writer.Write("[]"); } } if (PrimaryKey.GetValueOrDefault()) { writer.Write(" primary key"); } } if (Annotations != null && !Annotations.IsEmpty()) { writer.Write(" "); string delimiter = ""; foreach (AnnotationPart part in Annotations) { if (part.Name == null) { continue; } writer.Write(delimiter); delimiter = " "; part.ToEPL(writer); } } }