예제 #1
0
 public RawQuery AppendTable(TableNamePlaceholder alias)
 {
     _parts.Add(new QueryPart()
     {
         Table = alias,
     });
     return(this);
 }
예제 #2
0
 public RawQuery AppendColumn(KdPgColumnDescriptor column, TableNamePlaceholder tableAlias)
 {
     Debug.Assert(tableAlias != null);
     _parts.Add(new QueryPart()
     {
         Column = new ColumnPart(column, tableAlias),
     });
     return(this);
 }
예제 #3
0
        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);
        }
예제 #4
0
 public ColumnPart(KdPgColumnDescriptor column, TableNamePlaceholder tablePlaceholder)
 {
     Column           = column;
     TablePlaceholder = tablePlaceholder;
 }