protected internal override void WriteTo(StringBuilder template, QueryStatement parent)
 {
     template.Append(this.Keyword);
     template.Append(Space);
     template.Append("FROM");
     template.Append(Space);
     template.Append(this.Table.GetName());
 }
        protected internal override void WriteTo(StringBuilder template, QueryStatement parent)
        {
            var aliases = !(parent is UpdateStatement || parent is InsertStatement);

            template.AppendLine();
            template.Append(this.Keyword);
            template.Append(Space);
            template.Append(aliases ? this.GetFilterStringWithAlias() : this.GetFilterString());
        }
 protected internal override void WriteTo(StringBuilder template, QueryStatement parent)
 {
     template.Append(this.Keyword);
     template.Append(Space);
     template.Append(this.Table.Name);
     template.AppendLine();
     template.Append("SET");
     template.Append(Space);
     template.Append(this.GetColumnSetters());
 }
 protected internal override void WriteTo(StringBuilder template, QueryStatement parent)
 {
     template.Append(this.Keyword);
     template.Append(Space);
     template.Append("INTO");
     template.Append(Space);
     template.Append(this.Table.Name);
     template.Append(Space);
     template.Append(OpenParens);
     template.Append(this.Selectables.Select(column => column.Name).Join());
     template.Append(CloseParens);
     template.AppendLine();
     template.Append("VALUES");
     template.Append(Space);
     template.Append(OpenParens);
     template.Append(this.Selectables.Select(EntityColumnExtensions.GetValue).Join());
     template.Append(CloseParens);
 }
 protected internal abstract void WriteTo(StringBuilder template, QueryStatement parent);
 public virtual bool CanBeginStatement(QueryStatement current)
 {
     return current == null;
 }
 private static string CreateExceptionMessage(QueryStatement current, QueryStatement statement)
 {
     return string.Format("Keyword {0} cannot follow a {1}.", statement.Keyword, current.Keyword);
 }
 public StatementException(QueryStatement current, QueryStatement statement)
     : base(CreateExceptionMessage(current, statement))
 {
 }
 public override bool CanBeginStatement(QueryStatement current)
 {
     return AllowedStatements.Contains(current.GetType());
 }
 protected internal override void WriteTo(StringBuilder template, QueryStatement parent)
 {
     throw new NotImplementedException();
 }
 public override bool CanBeginStatement(QueryStatement current)
 {
     return current is SelectStatement || current is WhereStatement;
 }