public RawQuery AppendTable(TableNamePlaceholder alias) { _parts.Add(new QueryPart() { Table = alias, }); return(this); }
public RawQuery AppendColumn(KdPgColumnDescriptor column, TableNamePlaceholder tableAlias) { Debug.Assert(tableAlias != null); _parts.Add(new QueryPart() { Column = new ColumnPart(column, tableAlias), }); return(this); }
private string ResolvePlaceholder(RenderingContext ctx, TableNamePlaceholder placeholder) { var alias = ctx.AliasesStack.Select(x => x.GetValueOrDefault(placeholder.Name)).FirstOrDefault(x => x != null) ?? placeholder.Name; if (alias == placeholder.Table.Name) { return(null); } return(alias); }
public ColumnPart(KdPgColumnDescriptor column, TableNamePlaceholder tablePlaceholder) { Column = column; TablePlaceholder = tablePlaceholder; }