Exemplo n.º 1
0
 public static ValueNode AliasedCol <TTable>(AggregateType type, ValueNode parameter, string alias)
 {
     return(ValueNode.NewNamedColumn(
                new AliasedColumnNode(
                    ValueNode.NewAggregate(new Tuple <AggregateType, ValueNode>(type, parameter)),
                    alias)));
 }
Exemplo n.º 2
0
 public static ValueNode AliasedCol(
     string alias,
     AggregateType type,
     ValueNode aggregateParameter,
     IEnumerable <ValueNode> partitionBy     = null,
     IEnumerable <OrderByClauseNode> orderBy = null)
 {
     return(ValueNode.NewNamedColumn(
                new AliasedColumnNode(
                    WinCol(type, aggregateParameter, partitionBy, orderBy),
                    alias)));
 }
Exemplo n.º 3
0
 public static ValueNode WinCol(
     AggregateType type,
     ValueNode aggregateParameter,
     IEnumerable <ValueNode> partitionBy     = null,
     IEnumerable <OrderByClauseNode> orderBy = null)
 {
     return(ValueNode.NewWindowedColumn(
                new Tuple <Tuple <AggregateType, ValueNode>, AST.WindowNode>(
                    new Tuple <AggregateType, ValueNode>(type, aggregateParameter),
                    new AST.WindowNode(
                        partitionBy == null ? ListModule.Empty <ValueNode>() : ListModule.OfSeq(partitionBy),
                        orderBy == null ? ListModule.Empty <OrderByClauseNode>() : ListModule.OfSeq(orderBy)))));
 }
Exemplo n.º 4
0
 public static ValueNode Aggregate(AggregateType type, ValueNode parameter)
 {
     return(ValueNode.NewAggregate(new Tuple <AggregateType, ValueNode>(type, parameter)));
 }