public override string Translate(SqlCompilerContext context, SqlCreateView node, NodeSection section) { switch (section) { case NodeSection.Entry: var sb = new StringBuilder(); if (node.View.ViewColumns.Count > 0) { sb.Append(" ("); bool first = true; foreach (DataTableColumn c in node.View.ViewColumns) { if (first) { first = false; } else { sb.Append(ColumnDelimiter); } sb.Append(c.DbName); } sb.Append(")"); } return(sb.ToString()); case NodeSection.Exit: return(string.Empty); default: return(string.Empty); } }
public override string Translate(SqlCompilerContext context, SqlCreateView node, NodeSection section) { switch (section) { case NodeSection.Exit: if (node.View.CheckOptions == CheckOptions.Cascaded) { return("WITH CHECK OPTION"); } else { return(string.Empty); } default: return(base.Translate(context, node, section)); } }
public virtual void Visit(SqlCreateView node) { }
public void Test153() { SqlCreateView create = SqlDdl.Create(Catalog.Schemas["main"].Views["Invoice Subtotals"]); Console.Write(Compile(create)); }
public void Test153() { SqlCreateView create = SqlDdl.Create(schema.Views["customer_list"]); Console.Write(Compile(create)); }
public void Visit(SqlCreateView node) { }